Skip to content

Commit

Permalink
fix: specify type of elem parameter
Browse files Browse the repository at this point in the history
Close #82
  • Loading branch information
javier-godoy committed Jan 19, 2024
1 parent 6af641e commit 2700615
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/resources/META-INF/resources/frontend/code-viewer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}

Expand Down

0 comments on commit 2700615

Please sign in to comment.