Fix /addswipe error if swipe_info not initialized

This commit is contained in:
Wolfsblvt 2024-06-26 02:46:53 +02:00
parent 071a77fe1a
commit 9113fae4fe
1 changed files with 3 additions and 0 deletions

View File

@ -1998,6 +1998,9 @@ async function addSwipeCallback(_, arg) {
lastMessage.swipe_info = [{}];
lastMessage.swipe_id = 0;
}
if (!Array.isArray(lastMessage.swipe_info)) {
lastMessage.swipe_info = lastMessage.swipes.map(() => ({}));
}
lastMessage.swipes.push(arg);
lastMessage.swipe_info.push({