mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-03-01 10:27:43 +01:00
add console warning when delete set is not found in list
This commit is contained in:
parent
133a3663f4
commit
3b2dcd60da
@ -408,8 +408,12 @@ export class QuickReplySet {
|
|||||||
if (response.ok) {
|
if (response.ok) {
|
||||||
this.unrender();
|
this.unrender();
|
||||||
const idx = QuickReplySet.list.indexOf(this);
|
const idx = QuickReplySet.list.indexOf(this);
|
||||||
QuickReplySet.list.splice(idx, 1);
|
if (idx > -1) {
|
||||||
this.isDeleted = true;
|
QuickReplySet.list.splice(idx, 1);
|
||||||
|
this.isDeleted = true;
|
||||||
|
} else {
|
||||||
|
warn(`Deleted Quick Reply Set was not found in the list of sets: ${this.name}`);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
warn(`Failed to delete Quick Reply Set: ${this.name}`);
|
warn(`Failed to delete Quick Reply Set: ${this.name}`);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user