-
-
Notifications
You must be signed in to change notification settings - Fork 225
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Issue with array filled in a loop and returned at the end #594
Comments
The other option is to use There are couple of scoping issues when running babili along with es2015 https://github.com/babel/babili/issues?q=is%3Aissue+is%3Aopen+label%3A%22with+es2015%22 |
curiously you can sticky plaster fix it like this;
|
I've got the same problem, and work around it by using var, where the var still will be pulled into the for loop initializer, but the name when returning it is correct. I've tried the above solution aswell, which works too, and the var will be before the for loop, and the string will be in the initializer. Quite funny. |
Choose one: is this a bug report or feature request?
This used to work with
0.0.12
but as i upgraded to latest0.1.4
it broke. I am sorry but not sure which plugin might be causing this as i have no idea about the internals of babili.Input Code
Babel Configuration (.babelrc, package.json, cli command)
Expected Behavior
Output from
0.0.12
version and also the demo site gives this output as well.Watch the return at end.
Current Behavior
Watch the return at end. At runtime its and error because
coll
is undefined.Your Environment
UPDATE
I narrowed it down to
mangle
andmergeVars
plugin. If you use them individually they work fine but if you use them together then they produce this error..The text was updated successfully, but these errors were encountered: