Skip to content

Commit

Permalink
Fixed problem of empty content when transforming a list into a quote.
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgefilipecosta committed Nov 16, 2017
1 parent c90ccf2 commit 14392b2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion blocks/library/list/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,10 @@ registerBlockType( 'core/list', {
blocks: [ 'core/quote' ],
transform: ( { values } ) => {
return createBlock( 'core/quote', {
value: [ <p key="list">{ toBrDelimitedContent( values ) }</p> ],
value: values.length ? [
{ children: get( values[ 0 ], 'props.children' ) },
] : undefined,
citation: get( values, [ '1', 'props', 'children' ] ),
} );
},
},
Expand Down

0 comments on commit 14392b2

Please sign in to comment.