File tree 2 files changed +4
-1
lines changed
2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ const visitorsWithoutAncestors = {
104
104
break ;
105
105
case 'ObjectPattern' :
106
106
ArrayPrototypeForEach ( node . properties , ( property ) => {
107
- registerVariableDeclarationIdentifiers ( property . value ) ;
107
+ registerVariableDeclarationIdentifiers ( property . value || property . argument ) ;
108
108
} ) ;
109
109
break ;
110
110
case 'ArrayPattern' :
Original file line number Diff line number Diff line change @@ -144,6 +144,9 @@ const testCases = [
144
144
'(async () => { return { value: ((await x).y) } })()' ] ,
145
145
[ 'await (await x).y' ,
146
146
'(async () => { return { value: (await (await x).y) } })()' ] ,
147
+ [ 'var { ...rest } = await {}' ,
148
+ 'var rest; (async () => { void ({ ...rest } = await {}) })()' ,
149
+ ] ,
147
150
] ;
148
151
149
152
for ( const [ input , expected ] of testCases ) {
You can’t perform that action at this time.
0 commit comments