From e4f8aa310d376aa4715f9f26148fd0b74b69fd19 Mon Sep 17 00:00:00 2001 From: SillyLossy Date: Sat, 22 Apr 2023 17:37:32 +0300 Subject: [PATCH] Check for swipes before trying to record --- public/script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/script.js b/public/script.js index 511af7cfe..2bef5c553 100644 --- a/public/script.js +++ b/public/script.js @@ -1260,7 +1260,7 @@ class StreamingProcessor { setFirstSwipe(messageId) { if (this.type !== 'swipe' && this.type !== 'impersonate') { - if (chat[messageId]['swipes'].length === 1 && chat[messageId]['swipe_id'] === 0) { + if (Array.isArray(chat[messageId]['swipes']) && chat[messageId]['swipes'].length === 1 && chat[messageId]['swipe_id'] === 0) { chat[messageId]['swipes'][0] = chat[messageId]['mes']; } }