mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-02-23 15:37:50 +01:00
Merge pull request #1570 from nyxkrage/patch-1
fix: verify QR exists when deleting through /qr-delete
This commit is contained in:
commit
2c501891b5
@ -798,6 +798,10 @@ async function qrDeleteCallback(args, label) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const idx = preset.quickReplySlots.findIndex(x => x.label == label);
|
const idx = preset.quickReplySlots.findIndex(x => x.label == label);
|
||||||
|
if (idx === -1) {
|
||||||
|
toastr.warning('Confirm you are using proper case sensitivity!', `QR with label '${label}' not found`);
|
||||||
|
return '';
|
||||||
|
};
|
||||||
preset.quickReplySlots.splice(idx, 1);
|
preset.quickReplySlots.splice(idx, 1);
|
||||||
preset.numberOfSlots--;
|
preset.numberOfSlots--;
|
||||||
await fetch('/savequickreply', {
|
await fetch('/savequickreply', {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user