diff --git a/packages/core-commands/src/admin-navigation-commands.js b/packages/core-commands/src/admin-navigation-commands.js index 9f0883faa3c17a..8a8167bb29b820 100644 --- a/packages/core-commands/src/admin-navigation-commands.js +++ b/packages/core-commands/src/admin-navigation-commands.js @@ -97,7 +97,7 @@ export function useAdminNavigationCommands() { label: __( 'Add new post' ), icon: plus, callback: () => { - document.location.href = 'post-new.php'; + document.location.assign( 'post-new.php' ); }, } );