Skip to content

Commit fcb349f

Browse files
committed
fix(pat-navigation): Fix case where no click anchor could be found.
1 parent 97524d3 commit fcb349f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pat/navigation/navigation.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class Pattern extends BasePattern {
7474
// might be a child of the link, e.g. a span wrapped within an
7575
// anchor.
7676
const target = ev.target.closest("a");
77-
if (target.matches(":not(.pat-inject)")) {
77+
if (target?.matches(":not(.pat-inject)")) {
7878

7979
// Remove all set current classes
8080
this.clear_items();

0 commit comments

Comments
 (0)