Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RSVP.reject where the arg is not of type Error breaks error dispatching #14182

Closed
jasonmit opened this issue Sep 1, 2016 · 0 comments
Closed

Comments

@jasonmit
Copy link
Member

jasonmit commented Sep 1, 2016

The following will throw with Cannot read property 'indexOf' of undefined

run(RSVP, 'reject', 'foo');

(

let getStack = function(error) {
var stack = error.stack;
var message = error.message;
if (stack.indexOf(message) === -1) {
stack = message + '\n' + stack;
}
return stack;
};
) always assumes what it received is it an instance of an Error and has a stack.

This is currently happening on ember-alpha, passes on current stable release.

Fail test: jasonmit@54d1665

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant