From 76943490787978b52fdc0e2ba1e89c22b34ea122 Mon Sep 17 00:00:00 2001 From: Hiroyasu Nishiyama Date: Thu, 11 Jun 2020 23:00:56 +0900 Subject: [PATCH] prevent charAt call on websocket listener --- .../@node-red/nodes/core/network/22-websocket.html | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/node_modules/@node-red/nodes/core/network/22-websocket.html b/packages/node_modules/@node-red/nodes/core/network/22-websocket.html index 523dc2629..093256495 100644 --- a/packages/node_modules/@node-red/nodes/core/network/22-websocket.html +++ b/packages/node_modules/@node-red/nodes/core/network/22-websocket.html @@ -148,10 +148,12 @@ if (root.slice(-1) != "/") { root = root+"/"; } - if (this.path.charAt(0) == "/") { - root += this.path.slice(1); - } else { - root += this.path; + if (this.path) { + if (this.path.charAt(0) == "/") { + root += this.path.slice(1); + } else { + root += this.path; + } } return root; },