From 36f305e2e7a35c35f20c13edbcc3b00d9168c8b8 Mon Sep 17 00:00:00 2001 From: Andrew Nicolaou Date: Sun, 20 Oct 2019 17:21:28 +0200 Subject: [PATCH] Fix bug where "empty" view is shown when loading --- client/modules/User/components/Collection.jsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/modules/User/components/Collection.jsx b/client/modules/User/components/Collection.jsx index 95ccd4f3..1a4c07d4 100644 --- a/client/modules/User/components/Collection.jsx +++ b/client/modules/User/components/Collection.jsx @@ -394,7 +394,10 @@ class Collection extends React.Component { } _renderEmptyTable() { - if (!this.hasCollectionItems()) { + const isLoading = this.props.loading; + const hasCollectionItems = this.props.collection != null && this.props.collection.items.length > 0; + + if (!isLoading && !hasCollectionItems) { return (

No sketches in collection

); } return null;