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
2 people authored and michalczaplinski committed Dec 5, 2024
1 parent ae2ff97 commit 9749844
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 9749844

Please sign in to comment.