From 9a540a4f0a94f69daf1ccfc3df0336a58644f61f Mon Sep 17 00:00:00 2001 From: Bruce Martin Date: Tue, 19 Nov 2019 11:11:19 -0800 Subject: [PATCH] fix erroneous state clearing (#1052) --- client/src/util/typedCrossfilter/crossfilter.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/util/typedCrossfilter/crossfilter.js b/client/src/util/typedCrossfilter/crossfilter.js index 79244055..4bd12188 100644 --- a/client/src/util/typedCrossfilter/crossfilter.js +++ b/client/src/util/typedCrossfilter/crossfilter.js @@ -62,7 +62,7 @@ export default class ImmutableTypedCrossfilter { setData(data) { const { selectionCache } = this; - this.selectionCache = null; + this.selectionCache = {}; return new ImmutableTypedCrossfilter(data, this.dimensions, selectionCache); } @@ -159,7 +159,7 @@ export default class ImmutableTypedCrossfilter { select("blort", {mode: "range", lo: 0, hi: 999.99}); */ const { data, selectionCache } = this; - this.selectionCache = null; + this.selectionCache = {}; const dimensions = { ...this.dimensions }; const { dim, id, selection: oldSelection } = dimensions[name]; const newSelection = dim.select(spec);