Browse Source

HUE-8581 [importer] Fix timing related JS exceptions

Johan Ahlen 7 years ago
parent
commit
415b35d422
1 changed files with 4 additions and 2 deletions
  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]);
+            }
           }
         })
       });