From cd0254407e6408c30886c2a71585e73e3ee22cbd Mon Sep 17 00:00:00 2001 From: Shawn Erquhart Date: Thu, 28 Sep 2017 14:02:46 -0400 Subject: [PATCH] migrate Block.create to specify children --- .../Widgets/Markdown/MarkdownControl/VisualEditor/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/Widgets/Markdown/MarkdownControl/VisualEditor/index.js b/src/components/Widgets/Markdown/MarkdownControl/VisualEditor/index.js index b2159238..a3e21132 100644 --- a/src/components/Widgets/Markdown/MarkdownControl/VisualEditor/index.js +++ b/src/components/Widgets/Markdown/MarkdownControl/VisualEditor/index.js @@ -16,7 +16,8 @@ import styles from './index.css'; export default class Editor extends Component { constructor(props) { super(props); - const emptyBlock = Block.create({ kind: 'block', type: 'paragraph'}); + const emptyText = Text.createFromString(''); + const emptyBlock = Block.create({ kind: 'block', type: 'paragraph', nodes: [ emptyText ] }); const emptyRawDoc = { nodes: [emptyBlock] }; const rawDoc = this.props.value && markdownToSlate(this.props.value); const rawDocHasNodes = !isEmpty(get(rawDoc, 'nodes'))