Add couple of extra type checks

7def85a1740af7cb89307c34b3f632477d089136

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +2 -2Ignore whitespace
public/script.js+2 -2
@@ -6099,7 +6099,7 @@ export function syncMesToSwipe(messageId = null) {
60996099 }
61006100
61016101 const targetMessageId = messageId ?? chat.length - 1;
61026102 if (chat.length > targetMessageId || targetMessageId < 0) {
61036103 console.warn(`[syncMesToSwipe] Invalid message ID: ${messageId}`);
61046104 return false;
61056105 }
@@ -6120,7 +6120,7 @@ export function syncMesToSwipe(messageId = null) {
61206120 }
61216121
61226122 const targetSwipeInfo = targetMessage.swipe_info[targetMessage.swipe_id];
61236123 if (!targetSwipeInfo || typeof targetSwipeInfo !== 'object') {
61246124 return false;
61256125 }
61266126