only wrap in iife if necessary

pull/15813/head
ComputerGuy 1 year ago
parent 2ddb117d5f
commit 6ecdba57f8

@ -54,6 +54,10 @@ export function visit_assignment_expression(node, context, build_assignment) {
block.body.push(b.return(rhs));
}
if (is_standalone && !should_cache) {
return block;
}
const iife = b.arrow(should_cache ? [rhs] : [], block);
const iife_is_async =

@ -7,12 +7,12 @@ let c = 3;
let d = 4;
export function update(array) {
(() => {
{
let [$$1, $$2] = array;
$.set(a, $$1, true);
$.set(b, $$2, true);
})();
};
[c, d] = array;
}
Loading…
Cancel
Save