From 08c85658f970b548038ff6f569948a819558de99 Mon Sep 17 00:00:00 2001 From: Ryan Welcher Date: Tue, 30 Apr 2024 13:43:10 -0400 Subject: [PATCH] Add better syntax to the retrieve the content in the next steps example. --- templates/transforms/files/plugin/README.md.mustache | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/templates/transforms/files/plugin/README.md.mustache b/templates/transforms/files/plugin/README.md.mustache index 52eb0cf..f8de1a7 100644 --- a/templates/transforms/files/plugin/README.md.mustache +++ b/templates/transforms/files/plugin/README.md.mustache @@ -228,8 +228,9 @@ const transformers = { blocks: [ 'core/cover' ], transform: ( attributes, innerBlocks ) => { const [ firstBlock ] = innerBlocks; - const { content } = - firstBlock.attributes || 'More that meets the eye!'; + const content = + firstBlock?.attributes?.content || + 'More that meets the eye!'; return createBlock( 'block-developers-cookbook/transforms', { message: content, } );