only fetch channels when categoryLink is defined

This commit is contained in:
Travis Eden 2018-06-04 10:07:15 -04:00
parent 0cd5ef9ab4
commit 30da19e01b

View file

@ -42,7 +42,7 @@ class CategoryList extends React.PureComponent<Props, State> {
componentDidMount() {
const { fetching, categoryLink, fetchChannel } = this.props;
if (!fetching) {
if (!fetching && categoryLink) {
fetchChannel(categoryLink);
}