fix use of vm.Script by adding new

pull/4534/head
Patrick Wozniak 2024-01-21 01:23:07 +01:00
parent ec062d008f
commit f83174c40a
No known key found for this signature in database
GPG Key ID: A91D256891D33D14
1 changed files with 1 additions and 1 deletions

View File

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