We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 97524d3 + fcb349f commit 49f0ea4Copy full SHA for 49f0ea4
1 file changed
src/pat/navigation/navigation.js
@@ -74,7 +74,7 @@ class Pattern extends BasePattern {
74
// might be a child of the link, e.g. a span wrapped within an
75
// anchor.
76
const target = ev.target.closest("a");
77
- if (target.matches(":not(.pat-inject)")) {
+ if (target?.matches(":not(.pat-inject)")) {
78
79
// Remove all set current classes
80
this.clear_items();
0 commit comments