Skip to content

Commit

Permalink
Blocks HTML Mode: Styling change in the reducer
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Sep 29, 2017
1 parent 3d65fd6 commit 26b7eed
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions editor/reducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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',
};
}

Expand Down

0 comments on commit 26b7eed

Please sign in to comment.