Skip to content

Commit

Permalink
Merge pull request #83 from FlowingCode/fix-82
Browse files Browse the repository at this point in the history
fix: specify type of elem parameter
  • Loading branch information
flang authored Jan 19, 2024
2 parents 6af641e + 2700615 commit 1749c72
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 1749c72

Please sign in to comment.