-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
ES6 Promise polyfill failing in some environments #396
Labels
Comments
kytart
added a commit
to kytart/core-js
that referenced
this issue
May 3, 2018
Merged
zloirock
added a commit
that referenced
this issue
May 5, 2018
zloirock
added a commit
that referenced
this issue
May 5, 2018
zloirock
added a commit
that referenced
this issue
May 5, 2018
zloirock
added a commit
that referenced
this issue
May 7, 2018
zloirock
added a commit
that referenced
this issue
May 14, 2018
zloirock
added a commit
that referenced
this issue
May 18, 2018
zloirock
added a commit
that referenced
this issue
May 26, 2018
This was referenced Oct 4, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
So, I'm developing an app for LG WebOS 2. I write it in ES6, build it with webpack and transpile it to ES5 with babel loader. I'm using babel polyfill like this
in the beginning of the app. Everything is standard so far.
I'm aware of the fact that most people probably don't develop for WebOS so let me just say that it's a regular modern web browser and supports everything a regular browser supports.
In normal app there is no problem. But I'm trying to use web workers, which WebOS supports. My web worker code uses some modules I've written for the main app and those modules use stuff like promises, generators, etc. I want to use those the same way I'd use them in the main app so that's why I'm also using babel-polyfill in the web worker code. And here is the problem.
When I run the web worker, it throws an error
on this line.
I'm not exactly sure why but there seems to a problem with the fact that when Promise is polyfilled, Promise.resolve is defined as a function that expects one argument here.
while on the line that it failed it's called without any arguments. It's probably a property of the environment in which the web worker runs on WebOS. When I explicitly changed the line in my built code to
it works.
Maybe the line should be changed to this to prevent errors like this in exotic environments. I don't see any other solution.
The text was updated successfully, but these errors were encountered: