Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

fixes

Jason Kent8a2ca482d2ae
diff --git a/web/js/modules/natural-events/util.js b/web/js/modules/natural-events/util.js
index ecc7cbe0b..1e71cd48a 100644
--- a/web/js/modules/natural-events/util.js
+++ b/web/js/modules/natural-events/util.js
@@ -31,12 +31,14 @@ export function serializeEvent(currentItemState) {
export function serializeCategories(categories, state) {
const eventsTabActive = state.events.active;
- return eventsTabActive && categories.map(({ id }) => id);
+ return eventsTabActive ? categories.map(({ id }) => id) : undefined;
}
export function mapLocationToEventFilterState(parameters, stateFromLocation, state) {
const allCategories = state.config.naturalEvents.categories;
- const selectedIds = parameters.efc.split(',');
+ const selectedIds = parameters.efc
+ ? parameters.efc.split(',')
+ : allCategories.map(({ id }) => id);
const selectedCategories = !allCategories.length
? []
: selectedIds.map((id) => allCategories.find((c) => c.id === id));