diff --git a/packages/core-data/src/private-selectors.ts b/packages/core-data/src/private-selectors.ts index abdf2c837e8ed..0d4a28ad174a1 100644 --- a/packages/core-data/src/private-selectors.ts +++ b/packages/core-data/src/private-selectors.ts @@ -57,7 +57,12 @@ export const getBlockPatternsForPostType = createRegistrySelector( */ export const getEntityRecordsPermissions = createRegistrySelector( ( select ) => createSelector( - ( state: State, kind: string, name: string, ids: string[] ) => { + ( + state: State, + kind: string, + name: string, + ids: string | string[] + ) => { const normalizedIds = Array.isArray( ids ) ? ids : [ ids ]; return normalizedIds.map( ( id ) => ( { delete: select( STORE_NAME ).canUser( 'delete', { @@ -92,7 +97,7 @@ export function getEntityRecordPermissions( name: string, id: string ) { - return getEntityRecordsPermissions( state, kind, name, [ id ] )[ 0 ]; + return getEntityRecordsPermissions( state, kind, name, id )[ 0 ]; } /**