From f8a99113bf57adda904c3a0c343415dc90fe1195 Mon Sep 17 00:00:00 2001 From: Theis Pieter Hollebeek Date: Wed, 8 Feb 2023 12:12:14 +0100 Subject: [PATCH] fix type error --- frontend/src/topbar.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/topbar.ts b/frontend/src/topbar.ts index f6754af..b9859cd 100644 --- a/frontend/src/topbar.ts +++ b/frontend/src/topbar.ts @@ -2,7 +2,8 @@ export function setTopbarOffset() { const height = document.getElementById("topbar")!.getBoundingClientRect().height; - document.querySelector(":root")!.style = `--topbar-offset: ${height}px;` + const root: HTMLElement = document.querySelector(":root")!; + root.style.setProperty("--topbar-offset", `${height}px`); } export function addToggleDropdownListener() {