diff --git a/packages/block-library/src/gallery/shared.js b/packages/block-library/src/gallery/shared.js index f7d87e46a01aa2..06050ab65d8929 100644 --- a/packages/block-library/src/gallery/shared.js +++ b/packages/block-library/src/gallery/shared.js @@ -23,5 +23,5 @@ export const pickRelevantMediaFiles = ( image, sizeSlug = 'large' ) => { }; export function isGalleryV2Enabled() { - return window.wp.galleryBlockV2Enabled; + return window.wp?.galleryBlockV2Enabled === false ? false : true; }