diff --git a/client/modules/User/components/Collection.jsx b/client/modules/User/components/Collection.jsx
index 7379bd36f1..3301dfbb5c 100644
--- a/client/modules/User/components/Collection.jsx
+++ b/client/modules/User/components/Collection.jsx
@@ -205,7 +205,7 @@ class Collection extends React.Component {
if (
this.props.user != null &&
this.props.user.username &&
- this.props.collection.owner.username === this.props.user.username
+ this.props.collection?.owner?.username === this.props.user.username
) {
isOwner = true;
}
@@ -214,7 +214,7 @@ class Collection extends React.Component {
}
hasCollection() {
- return !this.props.loading && this.props.collection != null;
+ return !!this.props.collection;
}
hasCollectionItems() {
@@ -222,7 +222,7 @@ class Collection extends React.Component {
}
_renderLoader() {
- if (this.props.loading) return
{this.props.t('Collection.NoSketches')} @@ -516,13 +512,7 @@ Collection.propTypes = { Collection.defaultProps = { username: undefined, - collection: { - id: undefined, - items: [], - owner: { - username: undefined - } - } + collection: null }; function mapStateToProps(state, ownProps) {