From 26b7eedb3e7d24252f20a4a9449727693e743a24 Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Fri, 29 Sep 2017 16:06:41 +0100 Subject: [PATCH] Blocks HTML Mode: Styling change in the reducer --- editor/reducer.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/editor/reducer.js b/editor/reducer.js index 8a12ef367115ea..435cf759c282b0 100644 --- a/editor/reducer.js +++ b/editor/reducer.js @@ -139,7 +139,7 @@ export const editor = combineUndoableReducers( { }; case 'UPDATE_BLOCK': - // Ignore updates if block isn't known + // Ignore updates if block isn't known if ( ! state[ action.uid ] ) { return state; } @@ -430,9 +430,10 @@ export function hoveredBlock( state = null, action ) { export function blocksMode( state = {}, action ) { if ( action.type === 'TOGGLE_BLOCK_MODE' ) { + const { uid } = action; return { ...state, - [ action.uid ]: state[ action.uid ] && state[ action.uid ] === 'html' ? 'visual' : 'html', + [ uid ]: state[ uid ] && state[ uid ] === 'html' ? 'visual' : 'html', }; }