WXL
4 天以前 3bd962a6d7f61239c020e2dbbeb7341e5b842dd1
node_modules/terser/lib/compress/tighten-body.js
@@ -106,7 +106,6 @@
    AST_Unary,
    AST_UnaryPostfix,
    AST_UnaryPrefix,
    AST_Undefined,
    AST_Using,
    AST_Var,
    AST_VarDef,
@@ -122,6 +121,7 @@
} from "../ast.js";
import {
    make_node,
    make_void_0,
    MAP,
    member,
    remove,
@@ -635,7 +635,7 @@
                        }
                    } else {
                        if (!arg) {
                            arg = make_node(AST_Undefined, sym).transform(compressor);
                            arg = make_void_0(sym).transform(compressor);
                        } else if (arg instanceof AST_Lambda && arg.pinned()
                            || has_overlapping_symbol(fn, arg, fn_strict)) {
                            arg = null;
@@ -875,7 +875,7 @@
                    found = true;
                    if (node instanceof AST_VarDef) {
                        node.value = node.name instanceof AST_SymbolConst
                            ? make_node(AST_Undefined, node.value) // `const` always needs value.
                            ? make_void_0(node.value) // `const` always needs value.
                            : null;
                        return node;
                    }
@@ -1314,7 +1314,7 @@
            var stat = statements[i];
            if (prev) {
                if (stat instanceof AST_Exit) {
                    stat.value = cons_seq(stat.value || make_node(AST_Undefined, stat).transform(compressor));
                    stat.value = cons_seq(stat.value || make_void_0(stat).transform(compressor));
                } else if (stat instanceof AST_For) {
                    if (!(stat.init instanceof AST_DefinitionsLike)) {
                        const abort = walk(prev.body, node => {