| 3129 | const character = characters.find(x => x.avatar === name) ?? characters.find(x => x.name === name); | 3129 | const character = characters.find(x => x.avatar === name) ?? characters.find(x => x.name === name); |
| 3130 | let force_avatar, original_avatar; | 3130 | let force_avatar, original_avatar; |
| 3131 | | 3131 | |
| 3132 | if (characters[this_chid] === character) { | 3132 | if (this_chid !== undefined && characters[this_chid] === character) { |
| 3133 | // If the targeted character is the currently selected one in a solo chat, we don't need to force any avatars | 3133 | // If the targeted character is the currently selected one in a solo chat, we don't need to force any avatars |
| 3134 | } | 3134 | } |
| 3135 | else if (character && character.avatar !== 'none') { | 3135 | else if (character && character.avatar !== 'none') { |