Fix undefined reference
This commit is contained in:
parent
1315f0968b
commit
39c97f9b89
|
@ -803,7 +803,7 @@ export function getImageSizeFromDataURL(dataUrl) {
|
|||
|
||||
export function getCharaFilename(chid) {
|
||||
const context = getContext();
|
||||
const fileName = context.characters[chid ?? context.characterId].avatar;
|
||||
const fileName = context.characters[chid ?? context.characterId]?.avatar;
|
||||
|
||||
if (fileName) {
|
||||
return fileName.replace(/\.[^/.]+$/, '');
|
||||
|
|
Loading…
Reference in New Issue