You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note the dangerous location of buffer construction. If the loop were empty, it would not be called, but the code transformer considers the buffer prepared after that point regardless. In the empty test case, the subsequent yield will explode as _buffer would be undefined. Additionally, the buffer is overwritten on each iteration here.
Temporary workaround: include some emitted content prior to a function's first iterator. An HTML comment works well.
Simple fix: force buffer construction after function declaration.
The text was updated successfully, but these errors were encountered:
Simplest test case:
Ignoring default imports, optimizations, and line mapping, the transformed result is currently:
Note the dangerous location of buffer construction. If the loop were empty, it would not be called, but the code transformer considers the buffer prepared after that point regardless. In the empty test case, the subsequent
yield
will explode as_buffer
would be undefined. Additionally, the buffer is overwritten on each iteration here.Temporary workaround: include some emitted content prior to a function's first iterator. An HTML comment works well.
Simple fix: force buffer construction after function declaration.
The text was updated successfully, but these errors were encountered: