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

$q.reject blows up if no errback is supplied #845

Closed
@petebacondarwin

Description

@petebacondarwin

I think this may be a bug in $q.reject (see https://github.com/angular/angular.js/blob/master/src/ng/q.js#L277):

If I chain a reject with a then but do not provide an errback callback function the $q.reject method blows up.

See this fiddle: http://jsfiddle.net/dWbWJ/.

I believe that both arguments to the promise.then method can be optional (or at least should be).
I think the $q.reject method should test for the errback before trying to call it.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions