Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
yeze322 authored Apr 15, 2020
1 parent 86c903f commit 05dba27
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
// Licensed under the MIT License.

export function scrollNodeIntoView(selector: string) {
const node: Element = document.querySelector(selector) as Element;
node.scrollIntoView(true);
const node = document.querySelector(selector);
node?.scrollIntoView(true);
}

0 comments on commit 05dba27

Please sign in to comment.