mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2024-12-12 09:26:33 +01:00
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_info = [{}];
|
||||||
lastMessage.swipe_id = 0;
|
lastMessage.swipe_id = 0;
|
||||||
}
|
}
|
||||||
|
if (!Array.isArray(lastMessage.swipe_info)) {
|
||||||
|
lastMessage.swipe_info = lastMessage.swipes.map(() => ({}));
|
||||||
|
}
|
||||||
|
|
||||||
lastMessage.swipes.push(arg);
|
lastMessage.swipes.push(arg);
|
||||||
lastMessage.swipe_info.push({
|
lastMessage.swipe_info.push({
|
||||||
|
Loading…
Reference in New Issue
Block a user