Skip to content
This repository has been archived by the owner on Apr 3, 2023. It is now read-only.

Commit

Permalink
Ensure _total is reset prior to calculating.
Browse files Browse the repository at this point in the history
  • Loading branch information
kbirk committed Feb 6, 2018
1 parent 766ebae commit 294a42d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Facets Component developed by Uncharted Software",
"repository": "https://github.com/unchartedsoftware/stories-facets",
"license": "Apache-2.0",
"version": "2.12.1",
"version": "2.12.2",
"devDependencies": {
"body-parser": "~1.13.2",
"browserify": "^12.0.1",
Expand Down
1 change: 1 addition & 0 deletions src/components/group.js
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,7 @@ Group.prototype._initializeFacets = function (spec) {
this._total = spec.total;
} else {
this._ownsTotal = false;
this._total = 0;
spec.facets.forEach(function (facetSpec) {
if (!('histogram' in facetSpec) && !('placeholder' in facetSpec)) { // it's not a horizontal or placeholder facet
this._total += facetSpec.count;
Expand Down

0 comments on commit 294a42d

Please sign in to comment.