Skip to content

Commit

Permalink
[MIRROR] Fixes chat bluescreen [MDB IGNORE] (#702)
Browse files Browse the repository at this point in the history
* Fixes chat bluescreen (#79821)

---------

Co-authored-by: SkyratBot <[email protected]>
Co-authored-by: Jeremiah <[email protected]>
  • Loading branch information
3 people authored Nov 19, 2023
1 parent d324d84 commit 80255ae
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tgui/packages/tgui-panel/chat/middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,13 @@ export const chatMiddleware = (store) => {
loadChatFromStorage(store);
}
if (type === 'chat/message') {
const payload_obj = JSON.parse(payload);
let payload_obj;
try {
payload_obj = JSON.parse(payload);
} catch (err) {
return;
}

const sequence = payload_obj.sequence;
if (sequences.includes(sequence)) {
return;
Expand Down

0 comments on commit 80255ae

Please sign in to comment.