Skip to content

Commit

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

This reverts commit 9186964.
  • Loading branch information
jeryj authored Aug 1, 2024
1 parent 7f80f6e commit 1e4d427
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/block-editor/src/store/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ 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 @@ -1673,9 +1674,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 } = registry
.select( STORE_NAME )
.getSettings();
const { sectionRootClientId } = unlock(
registry.select( STORE_NAME ).getSettings()
);
if ( firstSelectedClientId ) {
let sectionClientId;

Expand Down

1 comment on commit 1e4d427

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in 1e4d427.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/10203902719
📝 Reported issues:

Please sign in to comment.