diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 2117809d3..cd65ad955 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -126,7 +126,11 @@ document.getElementById('progress-bar') ) { loadingProgress.subscribe((value) => { - document.getElementById('progress-bar').style.width = `${value * 0.24}rem`; + const progressBar = document.getElementById('progress-bar'); + + if (progressBar) { + progressBar.style.width = `${value * 0.24}rem`; + } }); await loadingProgress.set(100);