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 25, 2020
1 parent 995ad33 commit 093de87
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/block-library/src/cover/shared.js
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 093de87

Please sign in to comment.