mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Add strict to function node
This commit is contained in:
parent
9bc9994354
commit
6fb9739245
@ -15,6 +15,7 @@
|
|||||||
**/
|
**/
|
||||||
|
|
||||||
module.exports = function(RED) {
|
module.exports = function(RED) {
|
||||||
|
"use strict";
|
||||||
var util = require("util");
|
var util = require("util");
|
||||||
var vm = require("vm");
|
var vm = require("vm");
|
||||||
var fs = require('fs');
|
var fs = require('fs');
|
||||||
@ -45,7 +46,7 @@ module.exports = function(RED) {
|
|||||||
for (var m in results) {
|
for (var m in results) {
|
||||||
if (results[m]) {
|
if (results[m]) {
|
||||||
if (util.isArray(results[m])) {
|
if (util.isArray(results[m])) {
|
||||||
for (var n in results[m]) {
|
for (var n=0; n < results[m].length; n++) {
|
||||||
results[m][n]._topic = msg._topic;
|
results[m][n]._topic = msg._topic;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user