Post-increment in transpiled code is executed twice (T7432) #4348
Labels
outdated
A closed issue/PR that is archived due to age. Recommended to make a new issue
Projects
Bug information
Input code
Description
Here's the code that Babel emits for the above input:
As you can see,
index++
is executed twice, both within the condition of the conditional expression and within its second branch.2
is logged to the console1
is logged to the consoleEmitting an additional local variable and a sequence expression would solve the problem:
The text was updated successfully, but these errors were encountered: