Skip to content

Commit 2700615

Browse files
committed
fix: specify type of elem parameter
Close #82
1 parent 6af641e commit 2700615

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/main/resources/META-INF/resources/frontend/code-viewer.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -449,11 +449,11 @@ pre[class*="language-"] {
449449
div.style.top= `calc( ${top}px + 0.75em)`;
450450
div.style.height= `${height}px`;
451451

452-
const scrollIntoView = elem => {
453-
if ((elem as any).scrollIntoViewIfNeeded) {
454-
(elem as any).scrollIntoViewIfNeeded();
452+
const scrollIntoView = (elem : any) => {
453+
if (elem.scrollIntoViewIfNeeded) {
454+
elem.scrollIntoViewIfNeeded();
455455
} else {
456-
(elem as any).scrollIntoView()
456+
elem.scrollIntoView();
457457
}
458458
}
459459

0 commit comments

Comments
 (0)