From 43a5ca90f1ce0806f355d3cd4f1770a37e585f2d Mon Sep 17 00:00:00 2001 From: Jason Date: Wed, 26 Sep 2018 22:05:16 -0700 Subject: [PATCH] Fix for autocomplete xhr call showing undefined for httpAdminRoot. * not going to assume that httpAdminRoot is defined zachowj/node-red-contrib-home-assistant-websocket/issues/2 --- nodes/call-service/call-service.js | 2 +- nodes/current-state/current-state.js | 2 +- nodes/events-state-changed/events-state-changed.js | 2 +- nodes/poll-state/poll-state.js | 2 +- nodes/trigger-state/trigger-state.js | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/nodes/call-service/call-service.js b/nodes/call-service/call-service.js index 9b49d67657..7d58b3c1dc 100644 --- a/nodes/call-service/call-service.js +++ b/nodes/call-service/call-service.js @@ -93,7 +93,7 @@ module.exports = function(RED) { RED.nodes.registerType('api-call-service', CallServiceNode, { settings: { apiCallServiceAdminPrefix: { - value: RED.settings.httpAdminRoot, + value: RED.settings.httpAdminRoot || '/', exportable: true } } diff --git a/nodes/current-state/current-state.js b/nodes/current-state/current-state.js index 1e59d2abc4..d23c40f36b 100644 --- a/nodes/current-state/current-state.js +++ b/nodes/current-state/current-state.js @@ -68,7 +68,7 @@ module.exports = function(RED) { RED.nodes.registerType('api-current-state', CurrentStateNode, { settings: { apiCurrentStateAdminPrefix: { - value: RED.settings.httpAdminRoot, + value: RED.settings.httpAdminRoot || '/', exportable: true } } diff --git a/nodes/events-state-changed/events-state-changed.js b/nodes/events-state-changed/events-state-changed.js index 1c8f996e75..ffd87abcc9 100644 --- a/nodes/events-state-changed/events-state-changed.js +++ b/nodes/events-state-changed/events-state-changed.js @@ -89,7 +89,7 @@ module.exports = function(RED) { RED.nodes.registerType('server-state-changed', ServerStateChangedNode, { settings: { serverStateChangedAdminPrefix: { - value: RED.settings.httpAdminRoot, + value: RED.settings.httpAdminRoot || '/', exportable: true } } diff --git a/nodes/poll-state/poll-state.js b/nodes/poll-state/poll-state.js index 8da3c520b3..bfb9fa981f 100644 --- a/nodes/poll-state/poll-state.js +++ b/nodes/poll-state/poll-state.js @@ -87,7 +87,7 @@ module.exports = function(RED) { RED.nodes.registerType('poll-state', TimeSinceStateNode, { settings: { pollStateAdminPrefix: { - value: RED.settings.httpAdminRoot, + value: RED.settings.httpAdminRoot || '/', exportable: true } } diff --git a/nodes/trigger-state/trigger-state.js b/nodes/trigger-state/trigger-state.js index f25f6d1919..37ca356d8a 100644 --- a/nodes/trigger-state/trigger-state.js +++ b/nodes/trigger-state/trigger-state.js @@ -242,7 +242,7 @@ module.exports = function(RED) { RED.nodes.registerType('trigger-state', TriggerState, { settings: { triggerStateAdminPrefix: { - value: RED.settings.httpAdminRoot, + value: RED.settings.httpAdminRoot || '/', exportable: true } }