diff --git a/packages/editor/src/components/mode-switcher/index.js b/packages/editor/src/components/mode-switcher/index.js index 64930f545ec5a..45665d96d7a8b 100644 --- a/packages/editor/src/components/mode-switcher/index.js +++ b/packages/editor/src/components/mode-switcher/index.js @@ -4,6 +4,7 @@ import { __ } from '@wordpress/i18n'; import { MenuItemsChoice, MenuGroup } from '@wordpress/components'; import { useSelect, useDispatch } from '@wordpress/data'; +import { store as preferencesStore } from '@wordpress/preferences'; /** * Internal dependencies @@ -33,7 +34,9 @@ function ModeSwitcher( { } ) { const { mode } = useSelect( ( select ) => ( { - mode: select( editorStore ).getEditorMode(), + mode: + select( preferencesStore ).get( 'core', 'editorMode' ) ?? + 'visual', } ), [] );