Skip to content

Commit

Permalink
Revert "Edit Site: Fix useLink prop mutation (WordPress#65739)"
Browse files Browse the repository at this point in the history
This reverts commit e79d5bd.
  • Loading branch information
huubl authored Oct 2, 2024
1 parent d755d9b commit ed7ad4c
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions packages/edit-site/src/components/routes/link.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,14 @@ export function useLink( params, state, shouldReplace = false ) {
...Object.keys( currentArgs )
);

let extraParams = {};
if ( isPreviewingTheme() ) {
extraParams = {
params = {
...params,
wp_theme_preview: currentlyPreviewingTheme(),
};
}

const newUrl = addQueryArgs( currentUrlWithoutArgs, {
...params,
...extraParams,
} );
const newUrl = addQueryArgs( currentUrlWithoutArgs, params );

return {
href: newUrl,
Expand Down

0 comments on commit ed7ad4c

Please sign in to comment.