Fix undefined reference

39c97f9b8939ddb40edbdcc1e7fa3934c26e4a1a

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

1 files changed, +1 -1Ignore whitespace
public/scripts/utils.js+1 -1
@@ -803,7 +803,7 @@ export function getImageSizeFromDataURL(dataUrl) {
803803
804export function getCharaFilename(chid) {804export function getCharaFilename(chid) {
805 const context = getContext();805 const context = getContext();
806 const fileName = context.characters[chid ?? context.characterId].avatar;806 const fileName = context.characters[chid ?? context.characterId]?.avatar;
807807
808 if (fileName) {808 if (fileName) {
809 return fileName.replace(/\.[^/.]+$/, '');809 return fileName.replace(/\.[^/.]+$/, '');