From 5fef7a8fc05f7e55bec772058b1b987fb6f90877 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?nicole=20miko=C5=82ajczyk?= Date: Mon, 27 Oct 2025 05:44:00 +0100 Subject: [PATCH] pl-fe: improve default header/avatar detection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: nicole mikołajczyk --- packages/pl-fe/src/utils/accounts.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/pl-fe/src/utils/accounts.ts b/packages/pl-fe/src/utils/accounts.ts index bcb405cd4..69e82d718 100644 --- a/packages/pl-fe/src/utils/accounts.ts +++ b/packages/pl-fe/src/utils/accounts.ts @@ -39,7 +39,7 @@ const DEFAULT_HEADERS: string[] = [ ]; /** Check if the avatar is a default avatar */ -const isDefaultHeader = (url: string) => DEFAULT_HEADERS.some(header => url.endsWith(header)); +const isDefaultHeader = (url: string) => url === '' || DEFAULT_HEADERS.some(header => url.endsWith(header)); /** Default avatar filenames from various backends */ const DEFAULT_AVATARS = [ @@ -51,7 +51,7 @@ const DEFAULT_AVATARS = [ ]; /** Check if the avatar is a default avatar */ -const isDefaultAvatar = (url: string) => DEFAULT_AVATARS.some(avatar => url.endsWith(avatar)); +const isDefaultAvatar = (url: string) => url === '' || DEFAULT_AVATARS.some(avatar => url.endsWith(avatar)); export { getDomain,