Browse Source

AMBARI-15709. JS error on Dashboard page while fast switching pages (onechiporenko)

Oleg Nechiporenko 9 years ago
parent
commit
69ea74eade
1 changed files with 3 additions and 1 deletions
  1. 3 1
      ambari-web/app/views/main/dashboard/widgets.js

+ 3 - 1
ambari-web/app/views/main/dashboard/widgets.js

@@ -317,7 +317,9 @@ App.MainDashboardWidgetsView = Em.View.extend(App.UserPref, App.LocalStorage, Ap
     } else {
       // called when first load/refresh/jump back page
       this.getUserPref(this.get('persistKey')).complete(function () {
-        self.setOnLoadVisibleWidgetsComplete.apply(self);
+        if (self.get('state') === 'inDOM') {
+          self.setOnLoadVisibleWidgetsComplete.apply(self);
+        }
       });
     }
   },