Fix bug with undefined char on empty chats
| @@ -2139,7 +2139,7 @@ export function findChar({ name = null, allowAvatar = true, insensitive = true, | ||
| 2139 | 2139 | // Get the current character(s) |
| 2140 | 2140 | /** @type {any[]} */ |
| 2141 | 2141 | const currentChars = selected_group ? groups.find(group => group.id === selected_group)?.members.map(member => filteredCharacters.find(char => char.avatar === member)) |
| 2142 | 2142 | : [filteredCharacters.findfilter(char => characters[this_chid]?.avatar === char.avatar)]; |
| 2143 | 2143 | |
| 2144 | 2144 | // If we have a current char and prefer it, return that if it matches |
| 2145 | 2145 | if (preferCurrentChar) { |