Quellcode durchsuchen

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

Johan Ahlen vor 7 Jahren
Ursprung
Commit
cdbcbcd

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