I have a function that expects a promise which should resolve with 3 arguments.
The problem is that the function that returns the promise must wait for another deferred
function load(){
var d = $.Deferred();
this.getData().then(function(){
....
d.resolve(1, 2, 3);
});
return d.promise();
}
load().then(function(a, b, c){
....
});
Is there any way I can use the promise that is already returned by getData() and avoid creating another deferred object? The problem is that the promise returned by getData is resolved before then() is called and I don't know how to resolve it again with new arguments