Skip to content

Instantly share code, notes, and snippets.

@aaronj1335
Created October 23, 2012 02:39
Show Gist options
  • Save aaronj1335/3936362 to your computer and use it in GitHub Desktop.
Save aaronj1335/3936362 to your computer and use it in GitHub Desktop.
optionally returning a deferred
something.then(function() {
if (config.somethingElse) {
return somethingElse();
}
});
@medikoo
Copy link

medikoo commented Oct 23, 2012

It's perfectly ok. The final result would be undefined or resolved value of promise returned by somethingElse. Test it :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment