From 4c45d0e53e25b957e1c258c68a7b407e2370893b Mon Sep 17 00:00:00 2001 From: Andrew Duthie Date: Fri, 26 May 2017 18:41:58 -0400 Subject: [PATCH] Preserve isNew after save completes successfully --- editor/effects.js | 1 + editor/state.js | 2 +- editor/test/state.js | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/editor/effects.js b/editor/effects.js index 61e51c0d31f04e..f0a59b16feaa09 100644 --- a/editor/effects.js +++ b/editor/effects.js @@ -26,6 +26,7 @@ export default { dispatch( { type: 'REQUEST_POST_UPDATE_SUCCESS', post: newPost, + isNew, } ); } ).fail( ( err ) => { dispatch( { diff --git a/editor/state.js b/editor/state.js index 57b2234aed8cb4..d85309cbcd97fb 100644 --- a/editor/state.js +++ b/editor/state.js @@ -356,7 +356,7 @@ export function saving( state = {}, action ) { requesting: false, successful: true, error: null, - isNew: false, + isNew: action.isNew, }; case 'REQUEST_POST_UPDATE_FAILURE': diff --git a/editor/test/state.js b/editor/test/state.js index da6859330d8827..e751c8aec8af14 100644 --- a/editor/test/state.js +++ b/editor/test/state.js @@ -734,7 +734,7 @@ describe( 'state', () => { requesting: false, successful: true, error: null, - isNew: false, + isNew: true, } ); } );