From 482a41e49b3b8ecc231b0cf2bc640ed6dd2ca69f Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Wed, 12 Jun 2024 00:16:54 -0700 Subject: [PATCH] fix --- src/routes/+layout.svelte | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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);