Skip to content

Commit

Permalink
Use raw selectors for the dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Nov 18, 2024
1 parent f66b9c4 commit 98ee372
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/core-data/src/private-selectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { createSelector, createRegistrySelector } from '@wordpress/data';
/**
* Internal dependencies
*/
import type { State } from './selectors';
import { getDefaultTemplateId, getEntityRecord, type State } from './selectors';
import { STORE_NAME } from './name';
import { unlock } from './lock-unlock';

Expand Down Expand Up @@ -150,9 +150,10 @@ export const getHomePage = createRegistrySelector( ( select ) =>
} );
return { postType: 'wp_template', postId: frontPageTemplateId };
},
() => [
select( STORE_NAME ).getEntityRecord( 'root', 'site' ),
select( STORE_NAME ).getDefaultTemplateId( {
( state ) => [
// @ts-expect-error
getEntityRecord( state, 'root', 'site' ),
getDefaultTemplateId( state, {
slug: 'front-page',
} ),
]
Expand Down

0 comments on commit 98ee372

Please sign in to comment.