Преглед изворни кода

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(