File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ const visitorsWithoutAncestors = {
104104 break ;
105105 case 'ObjectPattern' :
106106 ArrayPrototypeForEach ( node . properties , ( property ) => {
107- registerVariableDeclarationIdentifiers ( property . value ) ;
107+ registerVariableDeclarationIdentifiers ( property . value || property . argument ) ;
108108 } ) ;
109109 break ;
110110 case 'ArrayPattern' :
Original file line number Diff line number Diff line change @@ -144,6 +144,9 @@ const testCases = [
144144 '(async () => { return { value: ((await x).y) } })()' ] ,
145145 [ 'await (await x).y' ,
146146 '(async () => { return { value: (await (await x).y) } })()' ] ,
147+ [ 'var { ...rest } = await {}' ,
148+ 'var rest; (async () => { void ({ ...rest } = await {}) })()' ,
149+ ] ,
147150] ;
148151
149152for ( const [ input , expected ] of testCases ) {
You can’t perform that action at this time.
0 commit comments