Browse Source

HUE-7498 [importer] Avoid js error when switching input types on a badly read data sample

Romain Rigaux 8 years ago
parent
commit
8f8f00b
1 changed files with 3 additions and 1 deletions
  1. 3 1
      desktop/libs/indexer/src/indexer/templates/importer.mako

+ 3 - 1
desktop/libs/indexer/src/indexer/templates/importer.mako

@@ -1223,7 +1223,9 @@ ${ assist.assistPanel() }
 
       self.inputFormat.subscribe(function(val) {
         wizard.destination.columns.removeAll();
-        self.sample.removeAll();
+        if (self.sample()) {
+          self.sample.removeAll();
+        }
         self.path('');
         resizeElements();
         self.rdbmsMode('customRdbms');