Skip to content

Commit cc3c9e5

Browse files
fix: handle if there are no errors
1 parent 1fd0fff commit cc3c9e5

File tree

1 file changed

+1
-1
lines changed
  • src/lazy-components/design-library/design-library-list

1 file changed

+1
-1
lines changed

src/lazy-components/design-library/design-library-list/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ const DesignLibraryList = memo( props => {
5858
{ ! ( designs || [] ).length &&
5959
<p className="components-base-control__help" data-testid="nothing-found-note">{ __( 'No designs found', i18n ) }</p>
6060
}
61-
{ typeof errors === 'object' && Object.keys( errors ).length &&
61+
{ typeof errors === 'object' && errors && Object.keys( errors ).length &&
6262
<p className="components-base-control__help">
6363
<strong>{ __( 'An error has occurred:', i18n ) }</strong>
6464
<br />

0 commit comments

Comments
 (0)