Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

$q.reject returns a promise with only a .then() method (.finally() and .catch() are missing) #5949

Closed
jasonswearingen opened this issue Jan 23, 2014 · 2 comments

Comments

@jasonswearingen
Copy link

using angular v1.2.9-build.2130+sha.02a4582

$q.reject doesn't return back a normal promise.

a workaround is to only use the .then() method but that's pretty annoying!

the workaround i ended up doing is not using return $q.reject("bad");

but instead i need to do this:

var rejected=$q.defer();
rejected.reject("bad");
return rejected.promise;
@lgalfaso
Copy link
Contributor

lgalfaso commented Feb 3, 2014

This was already fixed with #6076 and is part of 1.2.11

@caitp
Copy link
Contributor

caitp commented Feb 3, 2014

Ooops, forgot to close this issue. Thanks @lgalfaso (This was merged with 074b067)

@caitp caitp closed this as completed Feb 3, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants