Просмотр исходного кода

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

Romain Rigaux 8 лет назад
Родитель
Сommit
8f8f00b85c
1 измененных файлов с 3 добавлено и 1 удалено
  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');