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(); } }