From ab279935bd39f8a35730f20e3426646db63cafd2 Mon Sep 17 00:00:00 2001 From: Ramon Date: Tue, 9 Jul 2024 13:38:14 +1000 Subject: [PATCH] WP 6.6 merge - Patterns: check for edited entity content property when exporting (#63277) Merge https://github.com/WordPress/gutenberg/pull/63227 into wp/6.6 Co-authored-by: ramonjd Co-authored-by: andrewserong --- .../src/components/post-actions/export-pattern-action.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/editor/src/components/post-actions/export-pattern-action.js b/packages/editor/src/components/post-actions/export-pattern-action.js index deeac4314f653f..5edc23223163e8 100644 --- a/packages/editor/src/components/post-actions/export-pattern-action.js +++ b/packages/editor/src/components/post-actions/export-pattern-action.js @@ -24,8 +24,10 @@ function getJsonFromItem( item ) { { __file: item.type, title: item.title || item.name, - content: item.patternPost.content.raw, - syncStatus: item.patternPost.wp_pattern_sync_status, + content: item?.patternPost?.content?.raw || item.content, + syncStatus: + item?.patternPost?.wp_pattern_sync_status || + item.wp_pattern_sync_status, }, null, 2