Skip to content

Commit

Permalink
Prevent rendering of position className if undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Q committed Mar 27, 2020
1 parent d8e2d97 commit 6bf9103
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/block-library/src/cover/shared.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ export function attributesFromMedia( setAttributes ) {
}

export function getPositionClassName( contentPosition ) {
if ( contentPosition === undefined ) return '';

const index = getAlignmentIndex( contentPosition );

return POSITION_CLASSNAMES[ index ];
Expand Down

0 comments on commit 6bf9103

Please sign in to comment.