浏览代码

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

jdesjean 7 年之前
父节点
当前提交
357bdef
共有 1 个文件被更改,包括 5 次插入3 次删除
  1. 5 3
      desktop/libs/dashboard/src/dashboard/static/dashboard/js/search.ko.js

+ 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());