mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Fix duplication and scenario override for first in the list
This commit is contained in:
@@ -5309,7 +5309,7 @@ function addChatsSeparator(mesSendString) {
|
||||
}
|
||||
|
||||
async function duplicateCharacter() {
|
||||
if (!this_chid) {
|
||||
if (this_chid === undefined || !characters[this_chid]) {
|
||||
toastr.warning(t`You must first select a character to duplicate!`);
|
||||
return '';
|
||||
}
|
||||
@@ -7883,7 +7883,7 @@ function updateFavButtonState(state) {
|
||||
}
|
||||
|
||||
export async function setScenarioOverride() {
|
||||
if (!selected_group && !this_chid) {
|
||||
if (!selected_group && (this_chid === undefined || !characters[this_chid])) {
|
||||
console.warn('setScenarioOverride() -- no selected group or character');
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user