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

HUE-8581 [importer] Fix timing related JS exceptions

Johan Ahlen пре 7 година
родитељ
комит
415b35d
1 измењених фајлова са 4 додато и 2 уклоњено
  1. 4 2
      desktop/libs/indexer/src/indexer/templates/importer.mako

+ 4 - 2
desktop/libs/indexer/src/indexer/templates/importer.mako

@@ -2058,7 +2058,7 @@ ${ assist.assistPanel() }
         })
       });
       self.outputFormats.subscribe(function (newValue) {
-        if (newValue.map(function (entry) { return entry.value; }).indexOf(self.outputFormat()) < 0) {
+        if (newValue.length && newValue.map(function (entry) { return entry.value; }).indexOf(self.outputFormat()) < 0) {
           self.outputFormat(newValue && newValue[0].value);
         }
       });
@@ -2303,7 +2303,9 @@ ${ assist.assistPanel() }
               return true;
             }
           })) {
-            self.compute(namespace.computes[0]);
+            if (namespace.computes.length) {
+              self.compute(namespace.computes[0]);
+            }
           }
         })
       });