From 618c611a59dee125039055a2e529608f4d61841c Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Sun, 22 Mar 2020 22:50:18 -0700 Subject: [PATCH] Fixed: Series Network filter breaking if network was not available --- frontend/src/Store/Actions/seriesIndexActions.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/frontend/src/Store/Actions/seriesIndexActions.js b/frontend/src/Store/Actions/seriesIndexActions.js index aadc11ec7..6822625c1 100644 --- a/frontend/src/Store/Actions/seriesIndexActions.js +++ b/frontend/src/Store/Actions/seriesIndexActions.js @@ -298,12 +298,16 @@ export const defaultState = { label: 'Network', type: filterBuilderTypes.STRING, optionsSelector: function(items) { - const tagList = items.map((series) => { - return { - id: series.network, - name: series.network - }; - }); + const tagList = items.reduce((acc, series) => { + if (series.network) { + acc.push({ + id: series.network, + name: series.network + }); + } + + return acc; + }, []); return tagList.sort(sortByName); }