Skip to content

Commit

Permalink
[bugfix] Initialize filtersInFooter for all datasets
Browse files Browse the repository at this point in the history
This fixes a bug noticed in auspice.us [1] where certain
datasets would not have the `controls.filtersInFooter` state set,
causing a crash when metadata was dropped on. Type / prop checking
would have alerted us to this.

[1] #1304
  • Loading branch information
jameshadfield committed Mar 30, 2021
1 parent 11302dc commit d80608e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/actions/recomputeReduxState.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ const modifyStateViaMetadata = (state, metadata) => {
});
} else {
console.warn("JSON did not include any filters");
state.filtersInFooter = [];
}
state.filters[strainSymbol] = [];
state.filters[genotypeSymbol] = []; // this doesn't necessitate that mutations are defined
Expand Down

0 comments on commit d80608e

Please sign in to comment.