Skip to content

Commit

Permalink
Updating the order of the templates
Browse files Browse the repository at this point in the history
  • Loading branch information
scruffian committed Mar 11, 2022
1 parent a6e0fbe commit 349e890
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,10 @@ export default function NewTemplate( { postType } ) {

// Update the sort order to match the DEFAULT_TEMPLATE_SLUGS order.
missingTemplates.sort( ( template1, template2 ) => {
return DEFAULT_TEMPLATE_SLUGS.indexOf( template1.slug ) - DEFAULT_TEMPLATE_SLUGS.indexOf( template2.slug );
return (
DEFAULT_TEMPLATE_SLUGS.indexOf( template1.slug ) -
DEFAULT_TEMPLATE_SLUGS.indexOf( template2.slug )
);
} );

return (
Expand Down

0 comments on commit 349e890

Please sign in to comment.