Fix /addswipe error if swipe_info not initialized
This commit is contained in:
parent
071a77fe1a
commit
9113fae4fe
|
@ -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({
|
||||
|
|
Loading…
Reference in New Issue