From 689ae51ee75db7704f977d8e66b77687d095a867 Mon Sep 17 00:00:00 2001 From: Guillaume LECOMTE Date: Tue, 14 Apr 2026 12:16:57 +0200 Subject: [PATCH] fix(ui): remove early return to render theme-aware favicon immediately The previous implementation returned null when config was not yet loaded, preventing the theme-aware favicon from rendering during initial page load. Now uses optional chaining (config?.metaTitle, config?.customCss) throughout so the always renders with the correct theme-aware favicon regardless of config loading state. Fixes P1 issue from code review. --- .../proprietary/whitelabeling/whitelabeling-provider.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/apps/dokploy/components/proprietary/whitelabeling/whitelabeling-provider.tsx b/apps/dokploy/components/proprietary/whitelabeling/whitelabeling-provider.tsx index 23c99a78e..7fce2a935 100644 --- a/apps/dokploy/components/proprietary/whitelabeling/whitelabeling-provider.tsx +++ b/apps/dokploy/components/proprietary/whitelabeling/whitelabeling-provider.tsx @@ -16,16 +16,14 @@ export function WhitelabelingProvider() { : resolvedTheme === "light" ? "/icon-light.svg" : "/icon.svg"); - if (!config) return null; - return ( <> - {config.metaTitle && {config.metaTitle}} + {config?.metaTitle && {config.metaTitle}} - {config.customCss && ( + {config?.customCss && (