Skip to content

Commit

Permalink
Commit Marco's suggestion: Update packages/components/src/navigable-c…
Browse files Browse the repository at this point in the history
…ontainer/container.tsx

Co-authored-by: Marco Ciampini <[email protected]>
  • Loading branch information
kienstra and ciampo authored Apr 15, 2023
1 parent 29aef98 commit bff2e4b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/components/src/navigable-container/container.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@ class NavigableContainer extends Component< NavigableContainerProps > {
return;
}

const { activeElement } = ( event.target as HTMLElement ).ownerDocument;
const activeElement = ( event.target as HTMLElement | null )
?.ownerDocument?.activeElement;
if ( ! activeElement ) {
return;
}
Expand Down

0 comments on commit bff2e4b

Please sign in to comment.