Skip to content

Instantly share code, notes, and snippets.

@asyndrige
Created October 19, 2017 20:20
Show Gist options
  • Save asyndrige/fbefe1a7dc22aa0c7acbb6c7d9ebd562 to your computer and use it in GitHub Desktop.
Save asyndrige/fbefe1a7dc22aa0c7acbb6c7d9ebd562 to your computer and use it in GitHub Desktop.
function isMonoPage(docId, page) {
var res;
$scope.orderedDocs.forEach(function(doc) {
if (doc._id.$oid === docId) {
if (doc.pages.indexOf(page) >= 0) {
res = true;
} else if (doc.color_pages.indexOf(page) >= 0) {
res = false;
}
}
});
return res;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment