Explorar o código

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

Romain Rigaux %!s(int64=9) %!d(string=hai) anos
pai
achega
8e6c356
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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 fields;
     }
     }
-    return flatten(self.nested.schema());
+    return self.nested && self.nested.schema ? flatten(self.nested.schema()) : [];
   });
   });
   self.nestedAddLeaf = function(leaf) {
   self.nestedAddLeaf = function(leaf) {
     leaf.push(
     leaf.push(