Skip to content

Commit

Permalink
fix: return placeholder if items empty
Browse files Browse the repository at this point in the history
  • Loading branch information
eisbilir committed Jun 17, 2023
1 parent f9b7fe8 commit 08fc244
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/shared/containers/ContentfulLoader.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ class ContentfulLoader extends React.Component {

/* Some of the required data still pending to load: render a placeholder,
* or nothing. */
if (!data) {
if (!data || _.isEmpty(Object.values(data.entries.items))) {
return _.isFunction(Placeholder) ? <Placeholder /> : Placeholder;
}

Expand Down

0 comments on commit 08fc244

Please sign in to comment.