mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
allow empty catergories on indexer search
This commit is contained in:
@@ -2,7 +2,7 @@ import PropTypes from 'prop-types';
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import Label from 'Components/Label';
|
import Label from 'Components/Label';
|
||||||
|
|
||||||
function CategoryLabel({ categories }) {
|
function CategoryLabel({ categories = [] }) {
|
||||||
const sortedCategories = categories.filter((cat) => cat.name !== undefined).sort((c) => c.id);
|
const sortedCategories = categories.filter((cat) => cat.name !== undefined).sort((c) => c.id);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -21,7 +21,7 @@ function CategoryLabel({ categories }) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
CategoryLabel.propTypes = {
|
CategoryLabel.propTypes = {
|
||||||
categories: PropTypes.arrayOf(PropTypes.object).isRequired
|
categories: PropTypes.arrayOf(PropTypes.object)
|
||||||
};
|
};
|
||||||
|
|
||||||
export default CategoryLabel;
|
export default CategoryLabel;
|
||||||
|
Reference in New Issue
Block a user