From b980320d0a47cc9b5498649958444b9cacab02db Mon Sep 17 00:00:00 2001 From: sadan4 <117494111+sadan4@users.noreply.github.com> Date: Tue, 1 Apr 2025 20:43:17 -0400 Subject: [PATCH] ThemeAttributes: Fix null handling (#3308) --- src/plugins/themeAttributes/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 => [