Fix /ask in neutral chats
| @@ -2530,8 +2530,13 @@ async function askCharacter(args, text) { | ||
| 2530 | 2530 | return; |
| 2531 | 2531 | } |
| 2532 | 2532 | |
| 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 | + } | |
| 2535 | 2540 | |
| 2536 | 2541 | // Only force the new avatar if the character name is the same |
| 2537 | 2542 | // This skips if an error was fired |