Skip to content

Commit

Permalink
Remove unnecessary/incorrect unlock call in setEditorMode action (#…
Browse files Browse the repository at this point in the history
…64073)

Co-authored-by: talldan <talldanwp@git.wordpress.org>
  • Loading branch information
talldan and talldan authored Jul 30, 2024
1 parent e744018 commit 9186964
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/block-editor/src/store/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ import {
privateRemoveBlocks,
} from './private-actions';
import { STORE_NAME } from './constants';
import { unlock } from '../lock-unlock';

/** @typedef {import('../components/use-on-block-drop/types').WPDropOperation} WPDropOperation */

Expand Down Expand Up @@ -1674,9 +1673,9 @@ export const __unstableSetEditorMode =
// When switching to zoom-out mode, we need to select the parent section
if ( mode === 'zoom-out' ) {
const firstSelectedClientId = select.getBlockSelectionStart();
const { sectionRootClientId } = unlock(
registry.select( STORE_NAME ).getSettings()
);
const { sectionRootClientId } = registry
.select( STORE_NAME )
.getSettings();
if ( firstSelectedClientId ) {
let sectionClientId;

Expand Down

0 comments on commit 9186964

Please sign in to comment.