Fix /ask in neutral chats

This commit is contained in:
Cohee 2024-09-29 19:12:26 +03:00
parent 9f0c2300d2
commit 2f43c8e227

View File

@ -2530,8 +2530,13 @@ async function askCharacter(args, text) {
return;
}
setCharacterId(prevChId);
setCharacterName(characters[prevChId].name);
if (prevChId !== undefined) {
setCharacterId(prevChId);
setCharacterName(characters[prevChId].name);
} else {
setCharacterId(undefined);
setCharacterName(neutralCharacterName);
}
// Only force the new avatar if the character name is the same
// This skips if an error was fired