Fix: default rest argument array elements as undefined (#14032)

This commit is contained in:
Sneh Khatri
2021-12-14 02:21:57 +05:30
committed by GitHub
parent add64e870b
commit a7acde3885
7 changed files with 38 additions and 0 deletions

View File

@@ -242,6 +242,8 @@ export default function convertFunctionRest(path) {
let rest = node.params.pop().argument;
if (rest.name === "arguments") scope.rename(rest.name);
const argsId = t.identifier("arguments");
if (t.isPattern(rest)) {