فهرست منبع

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) {