From b78276d23d4a5e4fb0754468a72d844e31c34fd7 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Tue, 24 Sep 2019 22:05:48 -0700 Subject: [PATCH] Args won't always be present --- resources/scripts/plugins/Websocket.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/scripts/plugins/Websocket.ts b/resources/scripts/plugins/Websocket.ts index 682c96889..09aa2a118 100644 --- a/resources/scripts/plugins/Websocket.ts +++ b/resources/scripts/plugins/Websocket.ts @@ -29,7 +29,7 @@ export class Websocket extends EventEmitter { onmessage: e => { try { let { event, args } = JSON.parse(e.data); - this.emit(event, ...args); + args ? this.emit(event, ...args) : this.emit(event); } catch (ex) { console.warn('Failed to parse incoming websocket message.', ex); }