refactoring

This commit is contained in:
Philipp Kühn 2019-10-03 11:50:43 +02:00
parent 68ff32a024
commit 483fe11434
2 changed files with 8 additions and 3 deletions

View File

@ -91,7 +91,10 @@ class Menu {
} }
hide(event) { hide(event) {
if (event && event.relatedTarget) { if (event
&& event.relatedTarget
&& this.options.element.parentNode.contains(event.relatedTarget)
) {
return return
} }

View File

@ -146,8 +146,10 @@ class Menu {
} }
hide(event) { hide(event) {
if (event && event.relatedTarget if (event
&& this.options.element.parentNode.contains(event.relatedTarget)) { && event.relatedTarget
&& this.options.element.parentNode.contains(event.relatedTarget)
) {
return return
} }