Fix for when after from function or change is an array

This commit is contained in:
Steve Walsh
2021-07-08 16:57:27 +01:00
parent 2dba4dae7a
commit e67175157b
6 changed files with 116 additions and 15 deletions

View File

@@ -209,7 +209,7 @@ module.exports = function(RED) {
try {
this.on("input", function(msg) {
try {
const payloadValidator = new PayloadValidator(msg)
const payloadValidator = new PayloadValidator(msg, this.id)
var start = process.hrtime();
sandbox.msg = msg;
const vm2Instance = new vm2.VM({ sandbox, timeout: 5000 });

View File

@@ -229,7 +229,7 @@ module.exports = function(RED) {
}
if (valid) {
this.on('input', function(msg) {
const payloadValidator = new PayloadValidator(msg)
const payloadValidator = new PayloadValidator(msg, this.id)
for (var i=0; i<this.rules.length; i++) {
if (this.rules[i].t === "move") {
var r = this.rules[i];