From 9109579df28db7f773b32e6cad5896801868c8a7 Mon Sep 17 00:00:00 2001 From: Paul Bunkham Date: Wed, 28 Oct 2020 00:44:21 +0000 Subject: [PATCH] Reusable Blocks: Make the number retrieved from the API unlimited (#26486) * 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. --- packages/editor/src/components/provider/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/editor/src/components/provider/index.js b/packages/editor/src/components/provider/index.js index 6390f399e496e0..5f058cff6a73ce 100644 --- a/packages/editor/src/components/provider/index.js +++ b/packages/editor/src/components/provider/index.js @@ -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' ),