Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure metadata.display_defaults exists
A bug was introduced in PR #1280 where datasets which did not define `metadata.display_defaults` would crash, as the code assumed its existence. This property is optional in the dataset JSON. This commit ensures `display_defaults` exists in redux state after a dataset is loaded, thus allowing code to rely on its presence. This was preferred to checking for `display_defaults` in (all) the relevant sections of code, now and in future. (Using TypeScript, or expanding our smoke tests, would be approaches to avoiding these kinds of bugs in future.)
- Loading branch information