about summary refs log tree commit diff
path: root/streaming
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2019-04-27 19:16:29 -0500
committermultiple creatures <dev@multiple-creature.party>2019-05-21 03:16:22 -0500
commit2423830e3c08d319317dd193b7d3ad450016fd4a (patch)
tree95005dae071cd84ee4b5d558acfc67ed17b7c361 /streaming
parentd339d2bbb4aab43d810064bc12bdd0edaebd7263 (diff)
Don't crash if payload is undefined.
Diffstat (limited to 'streaming')
-rw-r--r--streaming/index.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/streaming/index.js b/streaming/index.js
index d4fb8cad3..eccf5219f 100644
--- a/streaming/index.js
+++ b/streaming/index.js
@@ -339,6 +339,11 @@ const startWorker = (workerId) => {
         return;
       }
 
+      if (payload === undefined) {
+        log.silly(req.requestId, `Skipped undefined ${event} payload`);
+        return;
+      }
+
       // Only send local-only statuses to logged-in users
       if (payload.local_only && !req.accountId) {
         log.silly(req.requestId, `Message ${payload.id} filtered because it was local-only`);