summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuciano Iam <lucianito@gmail.com>2020-04-12 14:37:44 +0200
committerRobin Gareus <robin@gareus.org>2020-04-13 16:29:39 +0200
commitde7b76e77d396457a9545a9e348682fff7e9dece (patch)
treef77d8124355b77e5d7d2e80214b0f399d654ed2b
parent3fd7be9abad5894a34972b775aa601a008dd3cb2 (diff)
WebSockets: fix node+addr hash when addr is undefined
-rw-r--r--share/web_surfaces/shared/channel.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/share/web_surfaces/shared/channel.js b/share/web_surfaces/shared/channel.js
index 2bec7f6795..9d1de0ac79 100644
--- a/share/web_surfaces/shared/channel.js
+++ b/share/web_surfaces/shared/channel.js
@@ -33,7 +33,7 @@ export const Node = Object.freeze({
export function nodeAddressHash(node, addr) {
- return [node].concat(addr).join('_');
+ return [node].concat(addr || []).join('_');
}
@@ -44,7 +44,7 @@ export class MessageChannel {
this.host = host;
}
- open () {
+ async open () {
return new Promise((resolve, reject) => {
this.socket = new WebSocket(`ws://${this.host}`);