fix use of vm.Script by adding new

This commit is contained in:
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

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 = {