Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Fix acces to layout when no Post Content block
  • Loading branch information
tellthemachines committed Sep 26, 2022
commit f2f7e2538789ebb280dc747d38121897c02360fb
3 changes: 1 addition & 2 deletions packages/edit-post/src/components/visual-editor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,7 @@ export default function VisualEditor( { styles } ) {
'.block-editor-block-list__layout.is-root-container'
);

const { attributes = {} } = postContentBlock;
const { layout = {} } = attributes;
const layout = postContentBlock?.attributes?.layout || {};

// Update type for blocks using legacy layouts.
const postContentLayout =
Expand Down