Skip to content

Commit

Permalink
fix: missing default value for grid block content objects (#1186)
Browse files Browse the repository at this point in the history
  • Loading branch information
Marvin Chin authored and yangshun committed Jan 16, 2019
1 parent e31ecdf commit 4dcd684
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion v1/lib/core/GridBlock.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,16 @@ const classNames = require('classnames');
const MarkdownBlock = require('./MarkdownBlock.js');

class GridBlock extends React.Component {
renderBlock(block) {
renderBlock(origBlock) {
const blockDefaults = {
imageAlign: 'left',
};

const block = {
...blockDefaults,
...origBlock,
};

const blockClasses = classNames('blockElement', this.props.className, {
alignCenter: this.props.align === 'center',
alignRight: this.props.align === 'right',
Expand Down

0 comments on commit 4dcd684

Please sign in to comment.