From 7e9d8d133e50b40c0cdb4cf6a6bcd8400b7f96b7 Mon Sep 17 00:00:00 2001 From: gparida1989 <44637258+gparida1989@users.noreply.github.com> Date: Fri, 2 Nov 2018 16:14:26 +0530 Subject: [PATCH] update pivot.cofee extra null check added to avoid error in case there is no filter data --- src/pivot.coffee | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/pivot.coffee b/src/pivot.coffee index 45c28261..55d19f98 100644 --- a/src/pivot.coffee +++ b/src/pivot.coffee @@ -982,7 +982,7 @@ callWithJQuery ($) -> exclusions = {} @find('input.pvtFilter').not(':checked').each -> filter = $(this).data("filter") - if exclusions[filter[0]]? + if filter and exclusions[filter[0]]? exclusions[filter[0]].push( filter[1] ) else exclusions[filter[0]] = [ filter[1] ] @@ -990,7 +990,7 @@ callWithJQuery ($) -> inclusions = {} @find('input.pvtFilter:checked').each -> filter = $(this).data("filter") - if exclusions[filter[0]]? + if filter and exclusions[filter[0]]? if inclusions[filter[0]]? inclusions[filter[0]].push( filter[1] ) else @@ -1095,7 +1095,8 @@ callWithJQuery ($) -> forEachCell = (f) => @find(scope).each -> x = $(this).data("value") - f(x, $(this)) if x? and isFinite(x) + f(x, $(this)) if x? + isFinite(x) values = [] forEachCell (x) -> values.push x