Remove path from URL in root/dashboard page (https://github.com/woocommerce/woocommerce-admin/pull/2674)
This commit is contained in:
parent
646235ac7b
commit
9f6e200ab7
|
@ -92,7 +92,11 @@ export function getSearchWords( query = navUtils.getQuery() ) {
|
||||||
* @return {String} Updated URL merging query params into existing params.
|
* @return {String} Updated URL merging query params into existing params.
|
||||||
*/
|
*/
|
||||||
export function getNewPath( query, path = getPath(), currentQuery = getQuery() ) {
|
export function getNewPath( query, path = getPath(), currentQuery = getQuery() ) {
|
||||||
return addQueryArgs( 'admin.php', { page: 'wc-admin', path, ...currentQuery, ...query } );
|
const args = { page: 'wc-admin', ...currentQuery, ...query };
|
||||||
|
if ( '/' !== path ) {
|
||||||
|
args.path = path;
|
||||||
|
}
|
||||||
|
return addQueryArgs( 'admin.php', args );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue