From 6b2e38d051a08a226c25ac9839468b0c0361b607 Mon Sep 17 00:00:00 2001 From: Denozordec Date: Sat, 11 Apr 2026 15:25:26 +0700 Subject: [PATCH] Fix navigation state handling in layout component - Updated the `isNavigating` derived variable to use a boolean conversion instead of a strict null check, preventing the navigation indicator from hanging when `navigating` is undefined. - Added a comment to clarify the reason for this change, enhancing code readability and maintainability. --- web/src/routes/+layout.svelte | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/src/routes/+layout.svelte b/web/src/routes/+layout.svelte index 2c1e3ef..8d1d9e7 100644 --- a/web/src/routes/+layout.svelte +++ b/web/src/routes/+layout.svelte @@ -15,7 +15,8 @@ let { children } = $props(); const docTitle = $derived(`${panelTitleFromPath(page.url.pathname)} · Telemt Panel`); - const isNavigating = $derived(navigating !== null); + /** Нельзя использовать `!== null`: при `navigating === undefined` выражение истинно и полоска «зависает». */ + const isNavigating = $derived(!!navigating); let serverAliases = $state([]);