Skip to content

Commit

Permalink
Add check for citation length
Browse files Browse the repository at this point in the history
  • Loading branch information
mkaz committed May 5, 2017
1 parent 98197c1 commit 5996a31
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions blocks/library/pullquote/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,13 @@ registerBlock( 'core/pullquote', {

return (
<blockquote className="blocks-pullquote">
{ value && wp.element.Children.map( value, ( paragraph, i ) => (
{ value && value.map( ( paragraph, i ) => (
<p key={ i }>{ paragraph }</p>
) ) }
<footer>{ citation }</footer>

{ citation && citation.length > 0 && (
<footer>{ citation }</footer>
) }
</blockquote>
);
}
Expand Down

0 comments on commit 5996a31

Please sign in to comment.