I am facing an issue with returning data from a chained promise. In the following scenario, how can this be achieved?
Here is some pseudocode:
mark = function(){
return promiseA
.then(function(data){ .....})
.then(function(data){return new OBJECT});
}
steve = function() { mark().SomeProperty}
The problem is that mark() is returning undefined. If I return a new Object from the first .then
, everything works fine. I need to be able to return data from the third or fourth chained promise. How can I make that happen?