Browse Source

Don't crash if payload is undefined.

undefined
multiple creatures 1 month ago
parent
commit
698d77fdde
1 changed files with 5 additions and 0 deletions
  1. 5
    0
      streaming/index.js

+ 5
- 0
streaming/index.js View File

@@ -339,6 +339,11 @@ const startWorker = (workerId) => {
339 339
         return;
340 340
       }
341 341
 
342
+      if (payload === undefined) {
343
+        log.silly(req.requestId, `Skipped undefined ${event} payload`);
344
+        return;
345
+      }
346
+
342 347
       // Only send local-only statuses to logged-in users
343 348
       if (payload.local_only && !req.accountId) {
344 349
         log.silly(req.requestId, `Message ${payload.id} filtered because it was local-only`);

Loading…
Cancel
Save