summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-09-12 10:09:18 +0100
committerPhil Hughes <me@iamphill.com>2017-09-12 10:09:18 +0100
commit8a556f85eb2a11882b485d5593d1564a780c8c64 (patch)
treee1e64693e4b5ae0d689e8d89a989c08e9d6317a4
parent19df4a8a875e7ebe0fb70b97080c75b89a7ac440 (diff)
downloadgitlab-ce-fly-out-nav-closest-undefined.tar.gz
Fix JS error in fly-out navfly-out-nav-closest-undefined
-rw-r--r--app/assets/javascripts/fly_out_nav.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/assets/javascripts/fly_out_nav.js b/app/assets/javascripts/fly_out_nav.js
index 4b19f7b4188..ad8254167a2 100644
--- a/app/assets/javascripts/fly_out_nav.js
+++ b/app/assets/javascripts/fly_out_nav.js
@@ -148,7 +148,7 @@ export const documentMouseMove = (e) => {
export const subItemsMouseLeave = (relatedTarget) => {
clearTimeout(timeoutId);
- if (!relatedTarget.closest(`.${IS_OVER_CLASS}`)) {
+ if (relatedTarget && !relatedTarget.closest(`.${IS_OVER_CLASS}`)) {
hideMenu(currentOpenMenu);
}
};