mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-03-01 18:37:41 +01:00
Fix undefined reference
This commit is contained in:
parent
1315f0968b
commit
39c97f9b89
@ -803,7 +803,7 @@ export function getImageSizeFromDataURL(dataUrl) {
|
|||||||
|
|
||||||
export function getCharaFilename(chid) {
|
export function getCharaFilename(chid) {
|
||||||
const context = getContext();
|
const context = getContext();
|
||||||
const fileName = context.characters[chid ?? context.characterId].avatar;
|
const fileName = context.characters[chid ?? context.characterId]?.avatar;
|
||||||
|
|
||||||
if (fileName) {
|
if (fileName) {
|
||||||
return fileName.replace(/\.[^/.]+$/, '');
|
return fileName.replace(/\.[^/.]+$/, '');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user