From 017377da1b1651323589f37754f7571c032d58c5 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() {