Skip to content
Merged
Changes from all commits
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
9 changes: 5 additions & 4 deletions packages/editor/src/components/post-actions/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,11 @@ export function usePostActions( { postType, onActionPerformed, context } ) {
}, [ registerPostTypeSchema, postType ] );

return useMemo( () => {
let actions = [
...defaultActions,
shouldShowSetAsHomepageAction ? setAsHomepageAction : [],
];
let actions = [ ...defaultActions ];
if ( shouldShowSetAsHomepageAction ) {
actions.push( setAsHomepageAction );
}

// Filter actions based on provided context. If not provided
// all actions are returned. We'll have a single entry for getting the actions
// and the consumer should provide the context to filter the actions, if needed.
Expand Down
Loading