From 4fce3afe9f54c80718be91f094aa8b26e9b770d5 Mon Sep 17 00:00:00 2001 From: Andrei Draganescu Date: Tue, 28 May 2019 15:27:56 +0300 Subject: [PATCH] fixed the failing session persistence test --- packages/block-editor/src/store/reducer.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/block-editor/src/store/reducer.js b/packages/block-editor/src/store/reducer.js index 33908e18e95eed..a09a5b8a423ba5 100644 --- a/packages/block-editor/src/store/reducer.js +++ b/packages/block-editor/src/store/reducer.js @@ -726,7 +726,10 @@ export function blockSelection( state = BLOCK_SELECTION_INITIAL_STATE, action ) previousSelection: omit( state, [ 'previousSelection' ] ), }; case 'RESTORE_SELECTED_BLOCK': - return state.previousSelection; + return { + ...BLOCK_SELECTION_INITIAL_STATE, + ...state.previousSelection, + }; case 'START_MULTI_SELECT': if ( state.isMultiSelecting ) { return state;