From 1bd4c377c61401f6b2b8f7ae188b3f50af2276e1 Mon Sep 17 00:00:00 2001 From: Todd Dembrey <todd.dembrey@torchbox.com> Date: Wed, 30 Jan 2019 11:33:11 +0000 Subject: [PATCH] Remove empty elements from the listing --- .../static_src/src/app/src/components/GroupedListing/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opentech/static_src/src/app/src/components/GroupedListing/index.js b/opentech/static_src/src/app/src/components/GroupedListing/index.js index be20ffca5..225bfcf4c 100644 --- a/opentech/static_src/src/app/src/components/GroupedListing/index.js +++ b/opentech/static_src/src/app/src/components/GroupedListing/index.js @@ -94,7 +94,7 @@ export default class GroupedListing extends React.Component { name: display, key, items: values.reduce((acc, value) => acc.concat(groupedItems[value] || []), []) - })) + })).filter(({items}) => items.length !== 0) this.setState({orderedItems}); } -- GitLab