Fix /ask in neutral chats

2f43c8e227205a31bb8adb1110ea9d549e4cef17

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +7 -2Ignore whitespace
public/scripts/slash-commands.js+7 -2
@@ -2530,8 +2530,13 @@ async function askCharacter(args, text) {
25302530 return;
25312531 }
25322532
2533- setCharacterId(prevChId);
2533+ if (prevChId !== undefined) {
2534- setCharacterName(characters[prevChId].name);
2534+ setCharacterId(prevChId);
2535+ setCharacterName(characters[prevChId].name);
2536+ } else {
2537+ setCharacterId(undefined);
2538+ setCharacterName(neutralCharacterName);
2539+ }
25352540
25362541 // Only force the new avatar if the character name is the same
25372542 // This skips if an error was fired