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

Internet Explorer (v11): Object doesn't support property or method 'includes' #15154

Closed
mk-conn opened this issue Apr 20, 2017 · 2 comments · Fixed by #15161
Closed

Internet Explorer (v11): Object doesn't support property or method 'includes' #15154

mk-conn opened this issue Apr 20, 2017 · 2 comments · Fixed by #15161

Comments

@mk-conn
Copy link

mk-conn commented Apr 20, 2017

I was about to deploy my ember app to our testing environment where I am able to test in Internet Explorer and this "browser" comes up with an error. I tracked it down to

ember.js/packages/ember-metal/lib/error_handler.js

// To maintain stacktrace consistency across browsers
let getStack = error => {
  let stack = error.stack;
  let message = error.message;

  if (stack && !stack.includes(message)) {
    stack = `${message}\n${stack}`;
  }

  return stack;
};

But I don't have no clue how to fix it - I don't know If this is something caused by my code... In the IE debugger the variable 'error' is undefined... In every other browser there is no issue... :-/

@mk-conn mk-conn changed the title Internet Explorer: Object doesn't support property or method 'includes' Internet Explorer (v11): Object doesn't support property or method 'includes' Apr 20, 2017
@rwjblue
Copy link
Member

rwjblue commented Apr 20, 2017

Good catch! What version of Ember was this against? Would you mind taking a crack at a PR that fixes?

If you are interested, the fix would be to change this line to if (stack && stack.indexOf(message) === -1) {.

@mk-conn
Copy link
Author

mk-conn commented Apr 21, 2017

The Ember version is 2.12.1. I will try to create a PR ...

mk-conn pushed a commit to mk-conn/ember.js that referenced this issue Apr 24, 2017
locks pushed a commit to mk-conn/ember.js that referenced this issue Apr 24, 2017
Usage of `Array#includes` is not supported by IE11.
locks added a commit that referenced this issue Apr 25, 2017
rwjblue pushed a commit that referenced this issue Apr 27, 2017
Usage of `Array#includes` is not supported by IE11.

(cherry picked from commit 6d3b250)
rwjblue pushed a commit that referenced this issue Apr 27, 2017
Usage of `Array#includes` is not supported by IE11.

(cherry picked from commit 6d3b250)
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

Successfully merging a pull request may close this issue.

2 participants