浏览代码

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

Romain Rigaux 8 年之前
父节点
当前提交
8f8f00b
共有 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');