Skip to content

Commit

Permalink
Merge pull request #208 from Automattic/fix/post-setup-campaign-error
Browse files Browse the repository at this point in the history
fix: situation that overwrote mc campaign id
  • Loading branch information
Jefferson Rabb authored May 11, 2020
2 parents 7e2d9c4 + 928d955 commit 7194b3d
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/newsletter-editor/editor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,13 @@ const Editor = compose( [
props
.apiFetchWithErrorHandling( getFetchDataConfig( { postId: props.postId } ) )
.then( result => {
props.editPost( getEditPostPayload( result ) );
const postUpdate = getEditPostPayload( result );
postUpdate.meta.color_palette = props.colorPalette;
props.editPost( postUpdate );
} );
}
}, [ props.isPublishingOrSavingPost ]);

useEffect(() => {
props.editPost( { meta: { color_palette: props.colorPalette } } );
}, []);

// Lock or unlock post publishing.
useEffect(() => {
if ( props.isReady ) {
Expand Down

0 comments on commit 7194b3d

Please sign in to comment.