Преглед изворни кода

HUE-8330 [frontend] Prevent initial js error in the dw sidebar when no app is set

Johan Ahlen пре 7 година
родитељ
комит
cdbcbcd
1 измењених фајлова са 3 додато и 0 уклоњено
  1. 3 0
      desktop/core/src/desktop/templates/ko_components/ko_dw_sidebar.mako

+ 3 - 0
desktop/core/src/desktop/templates/ko_components/ko_dw_sidebar.mako

@@ -81,6 +81,9 @@
         var throttle = -1;
         huePubSub.subscribe('set.current.app.name', function (appName) {
           window.clearTimeout(throttle);
+          if (!appName) {
+            return;
+          }
           throttle = window.setTimeout(function () {
             self.items().some(function (item) {
               return item.children.some(function (child) {