diff --git a/editor/components/post-text-editor/index.js b/editor/components/post-text-editor/index.js index 2fd4752ffeda5..5061421b308e9 100644 --- a/editor/components/post-text-editor/index.js +++ b/editor/components/post-text-editor/index.js @@ -63,13 +63,15 @@ export default connect( ( state ) => ( { value: getEditedPostContent( state ), } ), - ( dispatch ) => ( { + { onChange( content ) { - dispatch( editPost( { content } ) ); + return editPost( { content } ); }, onPersist( content ) { - dispatch( resetBlocks( parse( content ) ) ); - dispatch( checkTemplateValidity() ); + return [ + resetBlocks( parse( content ) ), + checkTemplateValidity(), + ]; }, - } ) + } )( PostTextEditor );