Skip to content

Commit

Permalink
Block Inspector: fix browser warning error when block is not selected (
Browse files Browse the repository at this point in the history
…#46875)

* Block Inspector: fix browser warning error when block is not selected

* Update changelog
  • Loading branch information
t-hamano authored Jan 4, 2023
1 parent 2addaea commit 0eb60bb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/block-editor/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

### Bug Fix

- `BlockInspector`: Fix browser warning error when block is not selected ([#46875](https://github.com/WordPress/gutenberg/pull/46875)).

## 11.1.0 (2023-01-02)

## 11.0.0 (2022-12-14)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ const BlockInspector = ( { showNoBlockSelectedMessage = true } ) => {

const blockInspectorAnimationSettings = useSelect(
( select ) => {
if ( isOffCanvasNavigationEditorEnabled ) {
if ( isOffCanvasNavigationEditorEnabled && blockType ) {
const globalBlockInspectorAnimationSettings =
select( blockEditorStore ).getSettings()
.__experimentalBlockInspectorAnimation;
Expand Down

1 comment on commit 0eb60bb

@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.
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/3837663932
📝 Reported issues:

Please sign in to comment.