Pārlūkot izejas kodu

HUE-8475 [report] Protect against pivot conflicting with nested facets

jdesjean 7 gadi atpakaļ
vecāks
revīzija
357bdef

+ 5 - 3
desktop/libs/dashboard/src/dashboard/static/dashboard/js/search.ko.js

@@ -1029,9 +1029,11 @@ var Collection = function (vm, collection) {
     }
 
     if (nestedFacet.aggregate) {
-      nestedFacet.aggregate.function.subscribe(function () {
-        vm.search();
-      });
+      if (nestedFacet.aggregate.function) {
+        nestedFacet.aggregate.function.subscribe(function () {
+          vm.search();
+        });
+      }
 
       nestedFacet.aggregate.metrics = ko.computed(function () {
         var _field = self.getTemplateField(nestedFacet.field(), self.template.fieldsAttributes());