Skip to content

Commit

Permalink
Remove fallback for context.postType (#67345)
Browse files Browse the repository at this point in the history
Co-authored-by: SantosGuillamot <[email protected]>
  • Loading branch information
SantosGuillamot and SantosGuillamot authored Nov 27, 2024
1 parent 6781982 commit c070dd4
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions packages/editor/src/bindings/post-meta.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,8 @@ export default {
return false;
}

const postType =
context?.postType || select( editorStore ).getCurrentPostType();

// Check that editing is happening in the post editor and not a template.
if ( postType === 'wp_template' ) {
// Lock editing when `postType` is not defined.
if ( ! context?.postType ) {
return false;
}

Expand Down

0 comments on commit c070dd4

Please sign in to comment.