-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Runtime is not strict mode compliant #165
Comments
@appden In what scenario does 6to5 include |
@sebmck This is not the default behavior, but happened as a result of my crazy build configuration to get my project packaged up correctly as a self-contained library. So yes, most users won't encounter this particular issue with 6to5. |
@appden Ah right okay. Just wanted to check if there were any potential bugs on our end. |
That particular problem is easy enough to fix, but I'm not sure what to do about the current technique of assigning to the undeclared |
Yeah, it's illegal to assign to undeclared variables in strict mode. A reliable way to get the current global scope (at least in my experience) has been |
@benjamn thank you for fixing this so quickly! |
To reproduce:
node --use_strict regenerator/runtime.js
. This is a problem when compiling with6to5
, as it will automatically include the strict header.Error Output
Minor Performance Opportunity?
While on this topic, shouldn't the runtime include the
"use strict"
header so that it can take advantage of performance optimizations that v8 and other engines likely provide?The text was updated successfully, but these errors were encountered: