Make sure that hoistable params have unique names, to avoid the duplicate argument name error.
pull/10098/head
Dmitry Sabanin 3 years ago committed by GitHub
parent 0c58524d23
commit fc3efb4cd2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -430,7 +430,13 @@ export function serialize_hoistable_params(node, context) {
} }
params.push(...hoistable_params); params.push(...hoistable_params);
return params;
const seen = new Set();
for (const param of params) {
seen.add(param.name);
}
const uniqueParams = params.filter(param => !seen.has(param.name));
return uniqueParams;
} }
/** /**

Loading…
Cancel
Save