Merge pull request #4534 from patlux/master

Replacing vm.createScript in favour of vm.Script
This commit is contained in:
Nick O'Leary 2024-05-09 15:19:45 +01:00 committed by GitHub
commit 1bb3a0eca5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -374,7 +374,7 @@ module.exports = function(RED) {
iniOpt.breakOnSigint = true;
}
}
node.script = vm.createScript(functionText, createVMOpt(node, ""));
node.script = new vm.Script(functionText, createVMOpt(node, ""));
if (node.fin && (node.fin !== "")) {
var finText = `(function () {
var node = {