fix: double load on mount. closes #1015

This commit is contained in:
Tom Moor 2019-08-20 22:13:36 -07:00
parent c0ec349ad2
commit 929722e1c1
1 changed files with 5 additions and 1 deletions

View File

@ -29,7 +29,11 @@ class Collections extends React.Component<Props> {
isPreloaded: boolean = !!this.props.collections.orderedData.length;
componentDidMount() {
this.props.collections.fetchPage({ limit: 100 });
const { collections } = this.props;
if (!collections.isFetching && !collections.isLoaded) {
collections.fetchPage({ limit: 100 });
}
}
@keydown('n')