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.
This commit is contained in:
@@ -15,7 +15,8 @@
|
|||||||
let { children } = $props();
|
let { children } = $props();
|
||||||
|
|
||||||
const docTitle = $derived(`${panelTitleFromPath(page.url.pathname)} · Telemt Panel`);
|
const docTitle = $derived(`${panelTitleFromPath(page.url.pathname)} · Telemt Panel`);
|
||||||
const isNavigating = $derived(navigating !== null);
|
/** Нельзя использовать `!== null`: при `navigating === undefined` выражение истинно и полоска «зависает». */
|
||||||
|
const isNavigating = $derived(!!navigating);
|
||||||
|
|
||||||
let serverAliases = $state<string[]>([]);
|
let serverAliases = $state<string[]>([]);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user