From 2ec7a6eb5ef4e54ea3faa01de9e76f8bc7f3581e Mon Sep 17 00:00:00 2001 From: DjidjaleskaSandra Date: Fri, 26 Apr 2024 09:26:09 +0200 Subject: [PATCH] Ensures that the registration process can continue without being interrupted by potential errors related to missing or invalid component/block paths --- scripts/editor/registration.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/editor/registration.js b/scripts/editor/registration.js index 8ee5c85b2..a961f1d6e 100644 --- a/scripts/editor/registration.js +++ b/scripts/editor/registration.js @@ -58,8 +58,8 @@ export const registerBlocks = ( overridesComponentPath = null, ) => { - const componentsManifest = componentsManifestPath.keys().map(componentsManifestPath); - const blocksManifests = blocksManifestPath.keys().map(blocksManifestPath); + const componentsManifest = componentsManifestPath ? componentsManifestPath.keys().map(componentsManifestPath) : []; + const blocksManifests = blocksManifestPath ? blocksManifestPath.keys().map(blocksManifestPath): []; // Set all store values. setStore();