From dd3c9c268e8430c6f3cae8e304626cac6d5c95ae Mon Sep 17 00:00:00 2001 From: Junkbite Date: Wed, 30 Jun 2021 17:38:13 -0400 Subject: [PATCH] allow empty catergories on indexer search --- frontend/src/Search/Table/CategoryLabel.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/Search/Table/CategoryLabel.js b/frontend/src/Search/Table/CategoryLabel.js index b2841f4c9..92e7f4e95 100644 --- a/frontend/src/Search/Table/CategoryLabel.js +++ b/frontend/src/Search/Table/CategoryLabel.js @@ -2,7 +2,7 @@ import PropTypes from 'prop-types'; import React from 'react'; import Label from 'Components/Label'; -function CategoryLabel({ categories }) { +function CategoryLabel({ categories = [] }) { const sortedCategories = categories.filter((cat) => cat.name !== undefined).sort((c) => c.id); return ( @@ -21,7 +21,7 @@ function CategoryLabel({ categories }) { } CategoryLabel.propTypes = { - categories: PropTypes.arrayOf(PropTypes.object).isRequired + categories: PropTypes.arrayOf(PropTypes.object) }; export default CategoryLabel;