Last active
January 30, 2017 23:27
-
-
Save boutell/ba8cd675ba5bee0f240c26620726c713 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let firstStep = null; | |
if (options.count !== false) { | |
// Create a dummy promise | |
firstStep = Promise.resolve(true); | |
} else { | |
// Do actual work | |
firstStep = q.clone().count(name + '.id')... // etc. | |
} | |
return firstStep.then(... more promises go down ...) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment