Break expression sync cycle and guard portrait lookup

This commit is contained in:
Tremendoussly
2026-03-15 17:38:39 +01:00
parent 1d297aeecf
commit 9ef5b16663
5 changed files with 101 additions and 74 deletions
+1 -1
View File
@@ -226,7 +226,7 @@ export function resolvePresentCharacterPortrait(name) {
}
}
if (this_chid !== undefined && characters[this_chid]?.name && namesMatch(characters[this_chid].name, name)) {
if (this_chid !== undefined && characters?.[this_chid]?.name && namesMatch(characters[this_chid].name, name)) {
const thumbnailUrl = getSafeThumbnailUrl('avatar', characters[this_chid].avatar);
if (thumbnailUrl) {
return thumbnailUrl;