From 27006154ebbea2e33123f89e49348e27bed41ada Mon Sep 17 00:00:00 2001 From: Javier Godoy <11554739+javier-godoy@users.noreply.github.com> Date: Fri, 19 Jan 2024 10:11:03 -0300 Subject: [PATCH] fix: specify type of elem parameter Close #82 --- .../resources/META-INF/resources/frontend/code-viewer.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/resources/META-INF/resources/frontend/code-viewer.ts b/src/main/resources/META-INF/resources/frontend/code-viewer.ts index 9aef0ad..d2f7a1e 100644 --- a/src/main/resources/META-INF/resources/frontend/code-viewer.ts +++ b/src/main/resources/META-INF/resources/frontend/code-viewer.ts @@ -449,11 +449,11 @@ pre[class*="language-"] { div.style.top= `calc( ${top}px + 0.75em)`; div.style.height= `${height}px`; - const scrollIntoView = elem => { - if ((elem as any).scrollIntoViewIfNeeded) { - (elem as any).scrollIntoViewIfNeeded(); + const scrollIntoView = (elem : any) => { + if (elem.scrollIntoViewIfNeeded) { + elem.scrollIntoViewIfNeeded(); } else { - (elem as any).scrollIntoView() + elem.scrollIntoView(); } }