From 24d9633a355ff0fac64dee2b356b99661079e921 Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Thu, 24 May 2018 14:29:30 +0800 Subject: fix corner cases with `eval()` (#3147) fixes #3146 --- lib/ast.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/ast.js') diff --git a/lib/ast.js b/lib/ast.js index b4b47651..331d340b 100644 --- a/lib/ast.js +++ b/lib/ast.js @@ -314,6 +314,9 @@ var AST_Scope = DEFNODE("Scope", "variables functions uses_with uses_eval parent if (this.functions) node.functions = this.functions.clone(); if (this.enclosed) node.enclosed = this.enclosed.slice(); return node; + }, + pinned: function() { + return this.uses_eval || this.uses_with; } }, AST_Block); -- cgit v1.2.3