-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Closed
Labels
i: needs triageoutdatedA closed issue/PR that is archived due to age. Recommended to make a new issueA closed issue/PR that is archived due to age. Recommended to make a new issue
Description
💻
- Would you like to work on a fix?
How are you using Babel?
Other (Next.js, Gatsby, vue-cli, ...)
Input code
var [ ... x ] = [ , ] ;Configuration file name
No response
Configuration
No response
Current and expected behavior
x is expected to be an array of length 1 that contains undefined but it is an array with an empty item.
// transpiled code
var x = [,];result of the input code
$ node
Welcome to Node.js v18.8.0.
Type ".help" for more information.
> var [ ... x ] = [ , ] ;
undefined
> x
[ undefined ]result of the transpiled code
$ node
Welcome to Node.js v18.8.0.
Type ".help" for more information.
> var x = [,];
undefined
> x
[ <1 empty item> ]Environment
Reproduction on Babel's own REPL
Possible solution
No response
Additional context
No response
Metadata
Metadata
Assignees
Labels
i: needs triageoutdatedA closed issue/PR that is archived due to age. Recommended to make a new issueA closed issue/PR that is archived due to age. Recommended to make a new issue