Fix type handling of active_character_id

0cdc389794ba53fe924cdc82a806361562d43cc7

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

1 files changed, +2 -3Showing whitespace changes
public/scripts/RossAscends-mods.js+2 -3
@@ -280,14 +280,13 @@ async function RA_autoloadchat() {
280280 // active character is the name, we should look it up in the character list and get the id
281281 if (active_character !== null && active_character !== undefined) {
282282 const active_character_id = characters.findIndex(x => getTagKeyForEntity(x) === active_character);
283283 if (active_character_id !== null-1) {
284284 await selectCharacterById(String(active_character_id));
285285
286286 // Do a little tomfoolery to spoof the tag selector
287287 const selectedCharElement = $(`#rm_print_characters_block .character_select[chid="${active_character_id}"]`);
288288 applyTagsOnCharacterSelect.call(selectedCharElement);
289289 } else {
290- if (!active_character_id) {
291290 setActiveCharacter(null);
292291 saveSettingsDebounced();
293292 console.warn(`Currently active character with ID ${active_character} not found. Resetting to no active character.`);