Skip to content

Commit

Permalink
Reusable Blocks: Make the number retrieved from the API unlimited (#2…
Browse files Browse the repository at this point in the history
…6486)

* Make the number of reusable blocks returned from the API unlimited

This is to fix #26352. Having no limit seems like it could be risky, but
there are a number of other places in the codebase where all entities
are returned in one call to the API, including categories, which could
return a similar amount of data to this.

* Remove unnecessary quotes to fix lint error.
  • Loading branch information
pablinos committed Oct 28, 2020
1 parent c56d489 commit 9109579
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/editor/src/components/provider/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,8 @@ export default compose( [
selectionEnd: getEditorSelectionEnd(),
reusableBlocks: select( 'core' ).getEntityRecords(
'postType',
'wp_block'
'wp_block',
{ per_page: -1 }
),
hasUploadPermissions: defaultTo(
canUser( 'create', 'media' ),
Expand Down

0 comments on commit 9109579

Please sign in to comment.