diff --git a/src/plugins/themeAttributes/index.ts b/src/plugins/themeAttributes/index.ts index 8e1e022b9..7d904e7e8 100644 --- a/src/plugins/themeAttributes/index.ts +++ b/src/plugins/themeAttributes/index.ts @@ -54,8 +54,8 @@ export default definePlugin({ } ], - getAvatarStyles(src: string) { - if (src.startsWith("data:")) return {}; + getAvatarStyles(src: string | null) { + if (!src || src.startsWith("data:")) return {}; return Object.fromEntries( [128, 256, 512, 1024, 2048, 4096].map(size => [