Fix error "Global assignment is not allowed within modules on node" (#7648)

This commit is contained in:
Jeremy Ruston 2023-07-31 11:50:58 +01:00 committed by GitHub
parent 3e213569e2
commit d0da1ef9d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -575,9 +575,8 @@ var globalCheck =[
" configurable: true",
" });",
" if(Object.keys(__temp__).length){",
" console.log(Object.keys(__temp__));",
" console.log(\"Warning: Global assignment detected\",Object.keys(__temp__));",
" delete Object.prototype.__temp__;",
" throw \"Global assignment is not allowed within modules on node.\";",
" }",
" delete Object.prototype.__temp__;",
].join('\n');