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

“TypeError: Object doesn't support property or method 'find'” in Internet Explorer (IE) 11 #1

Closed
luckygulli opened this issue Jun 4, 2018 · 4 comments

Comments

@luckygulli
Copy link

Hello,

Is it possible to add IE11 compatibility?

Using IE11, I get the following error:

  1. Find

    TypeError: Object doesn't support property or method 'find'
    hasComplex
    hasComplex.js:14

    The method find is not supported by IE according to mozilla.
    This could be corrected by adding Polyfill method even if Mozilla says:

    If you need to support truly obsolete JavaScript engines that don't support Object.defineProperty, it's best not to polyfill Array.prototype methods at all, as you can't make them non-enumerable.

  2. Includes

    Then, you'll get the following error:

    TypeError: Object doesn't support property or method 'includes'
    hasComplex
    hasComplex.js:19

    The method includes is not supported by IE according to mozilla.
    This could be corrected by adding Polyfill method even if Mozilla says:

    If you need to support truly obsolete JavaScript engines that don't support Object.defineProperty, it's best not to polyfill Array.prototype methods at all, as you can't make them non-enumerable.

That's all. You could maybe alternatively use JQuery.

Thanks.

@luckygulli luckygulli mentioned this issue Jun 4, 2018
@jkeruzec
Copy link

jkeruzec commented Jun 14, 2018

Interested in this one too !
edit: added it in lib directly and it works perfect!

@oklas
Copy link
Owner

oklas commented Jun 14, 2018

Have a nice day. Thank you for contribution. Most probably your another components will require this functions too, so to avoid code duplication use a polyfills like ie-array-find-polyfill and es6-object-assign. or better use a babel-polyfill.

@jkeruzec
Copy link

#3

Add new PR

@oklas
Copy link
Owner

oklas commented Dec 6, 2018

The package babel polyfill collects all the features which may not exists by default. It is possible to integrate all of that features at once or separately only that features which is required. It works quck and size is tiny. There is no any necessity to duplicate that features to some library else. The polyfill enabling is the task of the application unless any library because polyfill must be enabled once at the entry point of the application.

The simplest way to use is importing the babel polyfill at the begin of the application before any other modules:

import "@babel/polyfill"

For example the demo application uses babel polyfill at this line and works in ie11

@oklas oklas closed this as completed Jul 25, 2020
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

3 participants