Skip to content

Commit

Permalink
Remove last new Function() call (#1184)
Browse files Browse the repository at this point in the history
This is treated as an eval call by V8, and can't be executed in
environments where eval is blocked.

Fixes #925
  • Loading branch information
sgoo committed Apr 26, 2022
1 parent a8ab684 commit 67887ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/propmangle.js
Expand Up @@ -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() {};
});

[
Expand Down

0 comments on commit 67887ea

Please sign in to comment.