From 0bb518341d0a82796c3107df85a7243dfe116a87 Mon Sep 17 00:00:00 2001 From: robin Date: Wed, 6 Dec 2023 20:22:56 +0000 Subject: [PATCH] SSR --- frontend/src/lib/components/header/mobile.svelte | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/lib/components/header/mobile.svelte b/frontend/src/lib/components/header/mobile.svelte index 62022b4..e0a2e76 100644 --- a/frontend/src/lib/components/header/mobile.svelte +++ b/frontend/src/lib/components/header/mobile.svelte @@ -57,7 +57,8 @@ function stretchText() { let container = document.getElementById("logo-container") let textElement = document.getElementById("upper") - + if (!textElement) return + if (!container) return let containerWidth = container.offsetWidth let textWidth = textElement.offsetWidth let currentLetterSpacing = parseFloat(