Let say A() returns a resolved promise and go to B(). However, in some conditions, i need B() to finish and not execute the next then() ( I don't want to go in C(). I could use defered.reject() within B() method but it does not seem right.
var p = pull(target)
.then(function (data) {
return A();
})
.then(function (data) {
return B();
})
.then(function (data) {
return C();
})
Any hint ?
Your way to do branching with promises is the same as it is without them - by an
if
condition mostly: