Skip to content

Commit a9d2ec1

Browse files
committed
Add backport
1 parent 659305b commit a9d2ec1

File tree

2 files changed

+5
-6
lines changed
  • backport-changelog/6.8
  • packages/editor/src/components/global-styles-provider

2 files changed

+5
-6
lines changed

backport-changelog/6.8/7661.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
https://github.com/WordPress/wordpress-develop/pull/7661
2+
3+
* https://github.com/WordPress/gutenberg/pull/66468

packages/editor/src/components/global-styles-provider/index.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,16 +55,12 @@ function useGlobalStylesUserConfig() {
5555
const _globalStylesId =
5656
select( coreStore ).__experimentalGetCurrentGlobalStylesId();
5757

58+
let record;
59+
5860
// We want the global styles ID request to finish before triggering
5961
// the OPTIONS request for user capabilities, otherwise it will
6062
// fetch `/wp/v2/global-styles` instead of
6163
// `/wp/v2/global-styles/{id}`!
62-
if ( ! _globalStylesId ) {
63-
return { isReady: false };
64-
}
65-
66-
let record;
67-
6864
// Please adjust the preloaded requests if this changes!
6965
const userCanEditGlobalStyles = _globalStylesId
7066
? canUser( 'update', {

0 commit comments

Comments
 (0)