From df528fbcb28b12c0e88494f01b456bf33799544f Mon Sep 17 00:00:00 2001 From: Scott Goodhew Date: Tue, 26 Apr 2022 14:03:34 +0100 Subject: [PATCH] Remove last new Function() call This is treated as an eval call by V8, and can't be executed in environments where eval is blocked. Fixes #925 --- lib/propmangle.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/propmangle.js b/lib/propmangle.js index 27df236f4..9a94781b8 100644 --- a/lib/propmangle.js +++ b/lib/propmangle.js @@ -78,7 +78,7 @@ function find_builtins(reserved) { var global_ref = typeof global === "object" ? global : self; new_globals.forEach(function (new_global) { - objects[new_global] = global_ref[new_global] || new Function(); + objects[new_global] = global_ref[new_global] || function() {}; }); [