Fixed bug in `syncMesToSwipe`. `""` is falsy and a valid message. (#4733) * Fixed bug in `syncMesToSwipe`. * Use strict inequality operator --------- Co-authored-by: user <user@exmaple.com> Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>

d1035336a8591d28ac163d0886fee2b597b70ca8

DeclineThyself <FallenHaze@tutamail.com>

Signed
1 files changed, +2 -1Showing whitespace changes
public/script.js+2 -1
@@ -6258,7 +6258,8 @@ export function syncMesToSwipe(messageId = null) {
6258 return false;6258 return false;
6259 }6259 }
6260 // If the swipe is not present yet, exit out (will likely be copied later)6260 // If the swipe is not present yet, exit out (will likely be copied later)
6261 if (!targetMessage.swipes[targetMessage.swipe_id] || !targetMessage.swipe_info[targetMessage.swipe_id]) {6261 // "" is falsy. An empty string is a valid message.
6262 if (typeof targetMessage.swipes[targetMessage.swipe_id] !== 'string' || !targetMessage.swipe_info[targetMessage.swipe_id]) {
6262 return false;6263 return false;
6263 }6264 }
62646265