Skip to content

Commit

Permalink
Only show post types that declare support.editor, as a proxy for supp…
Browse files Browse the repository at this point in the history
…orting templates
  • Loading branch information
oandregal committed May 30, 2024
1 parent 35300bb commit 18756b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/edit-site/src/components/page-templates/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ export default function PageTemplates() {
const registeredPostTypes = useMemo( () => {
const result =
types
?.filter( ( type ) => type.viewable )
?.filter( ( type ) => type.viewable && type.supports.editor ) // supports.editor is a proxy for supporting templates.
.map( ( { name, slug } ) => ( { name, slug } ) )
.reduce( ( acc, current ) => {
acc[ current.slug ] = current.name;
Expand Down

0 comments on commit 18756b3

Please sign in to comment.