diff --git a/lib/serialize/parseFunction.js b/lib/serialize/parseFunction.js index b64904a1..d3bfc7fd 100644 --- a/lib/serialize/parseFunction.js +++ b/lib/serialize/parseFunction.js @@ -839,8 +839,10 @@ function resolveFunctionInfo( // Initializing properties of `internalVars` needs to happen before processing child functions, // as external vars in child functions can become internal vars in this function. // Store for later any which have no trails, as that indicates that the binding is accessed - // within a `with () {}` block, and mist not be renamed. + // within a `with () {}` block, and must not be renamed. // TODO: This is hacky as hell. There must be a better way to do it. + // I also don't think it works properly. + // e.g. `() => { let x; return [x => x, () => { with ({}) return () => x; }]}` // TODO: Check if internal vars are always created for all functions above where binding is. // TODO: Can this logic be combined with logic that prevents functions names being changed? const internalVarTrails = [],