-
Notifications
You must be signed in to change notification settings - Fork 20.5k
Closed
Description
When calling Deferred.notify([params]) it seems like the progress callback on the given promise ends up in an unexpected (incorrect?) situation.
It's receiving undefined as the first param and the params array object in the second.
Basically ... the 'notifyWith' sig (context, [params]).
I would expect the '.notify([params])' to still behave the same as in 1.x/2.x and give the inline progress callback with the given params.
return _retrieve()
.then(function (data, textStatus, jqXhr)
{
deferred.notify(data, textStatus, jqXhr);
if (data["@odata.nextLink"])
{
}
else
{
deferred.resolve(data, textStatus, jqXhr);
return data;
}
})
.then(function (data, textStatus, jqXhr)
{
assert.ok(true, "Records created");
return $a.WebAPI.retrieve();
})
.progress(function (data, textStatus, jqXhr)
{
assert.ok(true, "Retrieved a page");
})The progress callback here gets undefined in 'data' (so no context) and the 'params' object of the notifyWith in the 'textStatus' (with the 3 given params as [0], [1] and [2]).
EDIT (by @mgol): fixed the Markdown for proper code formatting.
Metadata
Metadata
Assignees
Labels
No labels