Skip to content

Commit

Permalink
isResolving wasn't updated in WordPress#56349 (WordPress#56491)
Browse files Browse the repository at this point in the history
This change does that
  • Loading branch information
ramonjd authored Nov 24, 2023
1 parent 55d0c84 commit fce345d
Showing 1 changed file with 13 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,25 +39,26 @@ export default function useGlobalStylesRevisions() {
const dirtyEntityRecords = __experimentalGetDirtyEntityRecords();
const _currentUser = getCurrentUser();
const _isDirty = dirtyEntityRecords.length > 0;
const query = {
per_page: 100,
};
const globalStylesId = __experimentalGetCurrentGlobalStylesId();
const globalStylesRevisions =
getRevisions(
'root',
'globalStyles',
__experimentalGetCurrentGlobalStylesId(),
{
per_page: 100,
}
) || EMPTY_ARRAY;
getRevisions( 'root', 'globalStyles', globalStylesId, query ) ||
EMPTY_ARRAY;
const _authors = getUsers( SITE_EDITOR_AUTHORS_QUERY ) || EMPTY_ARRAY;

const _isResolving = isResolving( 'getRevisions', [
'root',
'globalStyles',
globalStylesId,
query,
] );
return {
authors: _authors,
currentUser: _currentUser,
isDirty: _isDirty,
revisions: globalStylesRevisions,
isLoadingGlobalStylesRevisions: isResolving(
'getCurrentThemeGlobalStylesRevisions'
),
isLoadingGlobalStylesRevisions: _isResolving,
};
}, [] );
return useMemo( () => {
Expand Down

0 comments on commit fce345d

Please sign in to comment.