doortts doortts 2018-10-26
usermenu: Fix unintended user menu call
@8edae8d123facd3102f2ec1c665f4c839685354b
public/javascripts/common/yona.Usermenu.js
--- public/javascripts/common/yona.Usermenu.js
+++ public/javascripts/common/yona.Usermenu.js
@@ -1,12 +1,14 @@
 $(function() {
-    $.get(UsermenuUrl)
-        .done(function (data) {
-            $("#usermenu-tab-content-list").html(data);
-            afterUsermenuLoaded();
-        })
-        .fail(function (data) {
-            $yobi.alert("Usermenu loading failed: " + data);
-        });;
+    if($(".gnb-usermenu-dropdown").length !== 0) {
+        $.get(UsermenuUrl)
+            .done(function (data) {
+                $("#usermenu-tab-content-list").html(data);
+                afterUsermenuLoaded();
+            })
+            .fail(function (data) {
+                console.log("Usermenu loading failed: " + data);
+            });
+    }
 
     function afterUsermenuLoaded(){
         /* Set side navigation */
Add a comment
List