Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add backport
  • Loading branch information
ellatrix committed Oct 28, 2024
commit a9d2ec14a11af4fc641442428b418f821a936f6b
3 changes: 3 additions & 0 deletions backport-changelog/6.8/7661.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
https://github.com/WordPress/wordpress-develop/pull/7661

* https://github.com/WordPress/gutenberg/pull/66468
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,12 @@ function useGlobalStylesUserConfig() {
const _globalStylesId =
select( coreStore ).__experimentalGetCurrentGlobalStylesId();

let record;

// We want the global styles ID request to finish before triggering
// the OPTIONS request for user capabilities, otherwise it will
// fetch `/wp/v2/global-styles` instead of
// `/wp/v2/global-styles/{id}`!
if ( ! _globalStylesId ) {
return { isReady: false };
}

let record;

// Please adjust the preloaded requests if this changes!
const userCanEditGlobalStyles = _globalStylesId
? canUser( 'update', {
Expand Down