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

Version 1.1.0 breaks support for IE10/11 #15

Open
peterhass opened this issue Nov 14, 2019 · 5 comments
Open

Version 1.1.0 breaks support for IE10/11 #15

peterhass opened this issue Nov 14, 2019 · 5 comments

Comments

@peterhass
Copy link
Contributor

I am using is-dom through embed-js. I was wondering why it started to throw weird errors in IE and started digging deeper ...

Yarn silently updated my projects is-dom package from 1.0.9 to 1.1.0.

Following line causes the problem in IE:

if (!isObject(val) || !isWindow(window) || typeof window.Node !== `function`) {

typeof window.Node !== 'function' always returns true in IE (window.Node is of type 'object')

My temporary workaround is to pin is-dom version to 1.0.9.

{
  "name": "test",
  "version": "0.0.0",
  "dependencies": {
    "embed-js": "^5.0.3",
    "embed-plugin-noembed": "^5.0.3",
  },
  "resolutions": {
    "is-dom": "1.0.9"
  },
  "module": "src/main.js"
}
@TehShrike
Copy link
Member

Wow, that's an idiosyncrasy in old IE that I hadn't run into before.

Are we cool with checking 'Node' in window instead? Is that a bad choice for some other obscure reason?

@peterhass
Copy link
Contributor Author

'Node' in window should be good!

@TehShrike
Copy link
Member

PRs welcome 👍

@peterhass
Copy link
Contributor Author

Here you go: #16

TehShrike added a commit that referenced this issue Nov 18, 2019
#15 Fix global Node check to support IE as well
@TehShrike
Copy link
Member

👍 merged.

@yoshuawuyts can you publish as a patch?

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

2 participants