Skip to content

Commit

Permalink
Avoid showing placeholder until pages are loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
talldan committed Dec 5, 2019
1 parent d5eb638 commit 0dd1a36
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/block-library/src/navigation/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,14 @@ function Navigation( {
// indicated they want to automatically add top level Pages
// then show the Placeholder
if ( ! hasExistingNavItems ) {
if ( isRequestingPages ) {
return (
<>
<Spinner /> { __( 'Loading Navigation…' ) }
</>
);
}

return (
<Fragment>
<InspectorControls>
Expand Down

0 comments on commit 0dd1a36

Please sign in to comment.