From 56f50840bee4ef0c1878ca1cc667a81916c0fdea Mon Sep 17 00:00:00 2001 From: Alan Reader Date: Sun, 2 Sep 2018 23:58:54 +1000 Subject: [PATCH] fixing globelContext error --- config/nuimo-config.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/config/nuimo-config.js b/config/nuimo-config.js index 55d7207..b26da04 100644 --- a/config/nuimo-config.js +++ b/config/nuimo-config.js @@ -6,7 +6,10 @@ module.exports = function(RED) { var globalContext = this.context().global; var node = this; - var activeApp = globalContext.get("activeApp") || "pending"; + if (!globalContext.get("activeApp")) { + globalContext.set("activeApp", "pending"); + } + var activeApp = globalContext.get("activeApp"); var sensitivity = globalContext.get("sensitivity") || [70, 800]; let Timeout = require('../Timeout');