Browse Source

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

Romain Rigaux 9 years ago
parent
commit
8e6c356
1 changed files with 1 additions and 1 deletions
  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(