| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| 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) { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments