[Bug]: Destructuring empty array with invalid Symbol.iterator #15154
Labels
i: enhancement
outdated
A closed issue/PR that is archived due to age. Recommended to make a new issue
馃捇
How are you using Babel?
Other (Next.js, Gatsby, vue-cli, ...)
Input code
Configuration file name
No response
Configuration
No response
Current and expected behavior
In
input.js
,Symbol.iterator
is lazily evaluated soinput.js
is terminated without error.On the other hand,
Array.from(iter)
inoutput.js
eagerly throwsTypeError
:Environment
Reproduction on Babel's own REPL
Possible solution
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: