浏览代码

HUE-5231 [search] Avoid js error when nested types are disabled

Romain Rigaux 9 年之前
父节点
当前提交
8e6c356
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      apps/search/src/search/static/search/js/search.ko.js

+ 1 - 1
apps/search/src/search/static/search/js/search.ko.js

@@ -462,7 +462,7 @@ var Collection = function (vm, collection) {
       });
       return fields;
     }
-    return flatten(self.nested.schema());
+    return self.nested && self.nested.schema ? flatten(self.nested.schema()) : [];
   });
   self.nestedAddLeaf = function(leaf) {
     leaf.push(