diff --git a/packages/block-editor/src/store/reducer.js b/packages/block-editor/src/store/reducer.js index cdf966badf17d..57344d4be74d2 100644 --- a/packages/block-editor/src/store/reducer.js +++ b/packages/block-editor/src/store/reducer.js @@ -1914,9 +1914,8 @@ export function blockEditingModes( state = new Map(), action ) { } export function openedBlockSettingsMenu( state = null, action ) { - switch ( action.type ) { - case 'SET_OPENED_BLOCK_SETTINGS_MENU': - return action.clientId || null; + if ( 'SET_OPENED_BLOCK_SETTINGS_MENU' === action.type ) { + return action?.clientId; } return state; }