Skip to content

Commit d932948

Browse files
GuillaumeGomezsyphar
authored andcommitted
Fix JS error when menu is closed and alt key is pressed
1 parent b8e40eb commit d932948

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

static/menu.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,10 @@
281281
e.preventDefault();
282282
e.stopPropagation();
283283
}
284-
} else if (e.target.parentNode.classList.contains("pure-menu-has-children")) {
284+
} else if (e.target.parentNode &&
285+
e.target.parentNode.classList &&
286+
e.target.parentNode.classList.contains("pure-menu-has-children")
287+
) {
285288
switch (e.key.toLowerCase()) {
286289
case "arrowdown":
287290
case "down":

0 commit comments

Comments
 (0)