fix: replace `undefined` with `void(0)` in CallExpressions (#16693)

* fix: replace `undefined` with `void(0)` in CallExpressions

* tweak comment
main
ComputerGuy 4 days ago committed by GitHub
parent be645b4d9f
commit 2344b4052e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -0,0 +1,5 @@
---
'svelte': patch
---
fix: replace `undefined` with `void(0)` in CallExpressions

@ -100,7 +100,7 @@ export function call(callee, ...args) {
if (typeof callee === 'string') callee = id(callee);
args = args.slice();
// replacing missing arguments with `undefined`, unless they're at the end in which case remove them
// replacing missing arguments with `void(0)`, unless they're at the end in which case remove them
let i = args.length;
let popping = true;
while (i--) {
@ -108,7 +108,7 @@ export function call(callee, ...args) {
if (popping) {
args.pop();
} else {
args[i] = id('undefined');
args[i] = void0;
}
} else {
popping = false;

Loading…
Cancel
Save