mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-03-02 19:07:40 +01:00
Fix deleting swipe not clean swipe_info
This commit is contained in:
parent
8034564c3e
commit
071a77fe1a
@ -10103,6 +10103,9 @@ jQuery(async function () {
|
|||||||
if ($('#del_type').val() === 'swipe') {
|
if ($('#del_type').val() === 'swipe') {
|
||||||
const swipe_id = chat[this_edit_mes_id]['swipe_id'];
|
const swipe_id = chat[this_edit_mes_id]['swipe_id'];
|
||||||
chat[this_edit_mes_id]['swipes'].splice(swipe_id, 1);
|
chat[this_edit_mes_id]['swipes'].splice(swipe_id, 1);
|
||||||
|
if (Array.isArray(chat[this_edit_mes_id]['swipe_info']) && chat[this_edit_mes_id]['swipe_info'].length) {
|
||||||
|
chat[this_edit_mes_id].swipe_info.splice(swipe_id, 1);
|
||||||
|
}
|
||||||
if (swipe_id > 0) {
|
if (swipe_id > 0) {
|
||||||
$('.swipe_left:last').click();
|
$('.swipe_left:last').click();
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user