Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/edit-widgets/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

### Bug Fixes

- Prevent an error in `canInsertBlockInWidgetArea` when no widget area blocks are present.

## 6.54.0 (2026-08-26)

## 6.53.0 (2026-08-12)
Expand Down
4 changes: 4 additions & 0 deletions packages/edit-widgets/src/store/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,10 @@ export const canInsertBlockInWidgetArea = createRegistrySelector(
// widget area can be inserted into any widget area. Uses the first
// widget area for testing whether the block can be inserted.
const [ firstWidgetArea ] = widgetAreas;
if ( ! firstWidgetArea ) {
return false;
}

return select( blockEditorStore ).canInsertBlockType(
blockName,
firstWidgetArea.clientId
Expand Down
Loading