summaryrefslogtreecommitdiff
path: root/frontend/src
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src')
-rw-r--r--frontend/src/api/websocket.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/frontend/src/api/websocket.js b/frontend/src/api/websocket.js
index d145076b..5adae17b 100644
--- a/frontend/src/api/websocket.js
+++ b/frontend/src/api/websocket.js
@@ -35,7 +35,7 @@ export class JsonStompClient {
static parseBody<T>(message: Message): T | void {
try {
- return message.body && JSON.parse(message.body);
+ return message.body ? JSON.parse(message.body) : undefined;
} catch (jsonParseError) {
throw new Error('Cannot parse websocket message as JSON: ' + jsonParseError.message);
}
bgstack15