I have a conditional statement in which I need to perform one of two operations, then continue after whichever operation has resolved. So my code currently looks as follows:
var promise = shoud_do_thing_a? do_thing_a: do_thing_b promise().then(function () { // more code })