17
I have a function in a chain of promises that may or may not do something. E.g.
getYear().then(function(results){
if(results.is1999) return party();
else return Q.fcall(function(){/*do nothing here*/});
}).then(sleep)
Where getYear, party, and sleep all return promises. Is there a more concise way to write the else statement? That is, do nothing, but still return a chainable promise?