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

Script error in shedule.js in IE9/Win7 #1236

Closed
KarolBuchta opened this issue Sep 15, 2016 · 3 comments
Closed

Script error in shedule.js in IE9/Win7 #1236

KarolBuchta opened this issue Sep 15, 2016 · 3 comments

Comments

@KarolBuchta
Copy link

(This issue tracker is only for bug reports or feature requests, if this is neither, please choose appropriate channel from http://bluebirdjs.com/docs/support.html)

Please answer the questions the best you can:

  1. What version of bluebird is the issue happening on?
    3.4.6

  2. What platform and version? (For example Node.js 0.12 or Google Chrome 32)
    Internet Explorer 9, Windows 7 SP1 (Modern IE VM)

  3. Did this issue happen with earlier version of bluebird?
    3.4.1

First: I am running your code in an environment where a third party js stack is running (Atlassian).

My issue is that in IE9 this line leads to a script error:
https://github.com/petkaantonov/bluebird/blob/master/src/schedule.js#L50

Unable to get value of the property 'toggle': object is null or undefined.

htmlElement.classList is not defined in IE9:
http://www.w3schools.com/jsref/prop_element_classlist.asp

@benjamingr
Copy link
Collaborator

@KarolBuchta do you have a mutationobserver polyfill used?

I think we can just opt out of that scheduler if classList isn't there too. Should be a simple enough fix.

@benjamingr
Copy link
Collaborator

Ping @KarolBuchta - please comment if you have additional info

I can't reproduce this without using a faulty polyfill. I recommend you try including bluebird first and any polyfills second.

@mqudsi
Copy link

mqudsi commented Mar 28, 2019

I ran into this when loading a MutationObserver polyfill prior to loading bluebird. The reason for manually attempting to load a MutationObserver polyfill was this error communicated to our servers:

{
    Browser: "Mozilla/5.0 (Linux; U; Android 4.2.2; en-us; R2001 Build/JDQ39) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 UCBrowser/11.5.2.1188 (UCMini) Mobile",
    Message: "Uncaught ReferenceError: MutationObserver is not defined",
    Line: 1,
    Column: 0,
    File: null,
    Stacktrace: null,
    _typeTag: "ClientError"
}

Without a stack trace (it wasn't included in the client-side event by the browser) it's hard to know if this error is coming from bluebird attempting to polyfill Promise or a client trying to use it.

Loading bluebird first stopped the toggle error from occurring on IE9.

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