Skip to content

Commit

Permalink
Revert and fix TS error
Browse files Browse the repository at this point in the history
  • Loading branch information
manzoorwanijk committed Dec 6, 2024
1 parent d4a0e1a commit 9a5a859
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions packages/core-data/src/private-selectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,7 @@ export const getBlockPatternsForPostType = createRegistrySelector(
*/
export const getEntityRecordsPermissions = createRegistrySelector( ( select ) =>
createSelector(
(
state: State,
kind: string,
name: string,
ids: string | string[]
) => {
( state: State, kind: string, name: string, ids: string[] ) => {
const normalizedIds = Array.isArray( ids ) ? ids : [ ids ];
return normalizedIds.map( ( id ) => ( {
delete: select( STORE_NAME ).canUser( 'delete', {
Expand Down Expand Up @@ -97,7 +92,7 @@ export function getEntityRecordPermissions(
name: string,
id: string
) {
return getEntityRecordsPermissions( state, kind, name, id )[ 0 ];
return getEntityRecordsPermissions( state, kind, name, [ id ] )[ 0 ];
}

/**
Expand Down

0 comments on commit 9a5a859

Please sign in to comment.