Ver Fonte

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

Romain Rigaux há 8 anos atrás
pai
commit
8f8f00b

+ 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');