Skip to content

Commit

Permalink
oops
Browse files Browse the repository at this point in the history
  • Loading branch information
HalvorHaugan committed Oct 21, 2024
1 parent 7bc5838 commit b1de8b0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const useVirtualFocus = (

const setActiveAndScrollToElement = (element?: HTMLElement) => {
setActiveElement(element);
element?.scrollIntoView({ block: "nearest" });
element?.scrollIntoView?.({ block: "nearest" });
};

const moveFocusUp = () => {
Expand Down

0 comments on commit b1de8b0

Please sign in to comment.