File tree Expand file tree Collapse file tree 2 files changed +245
-240
lines changed
Expand file tree Collapse file tree 2 files changed +245
-240
lines changed Original file line number Diff line number Diff line change @@ -48,15 +48,13 @@ define(
4848 loader . startLoader ( ) ;
4949
5050 /** fix load page FPC */
51- const url = new URL ( window . location ) ;
52- url . href = submitUrl ;
53- if ( url . searchParams . get ( 'mpLayer' ) ) {
54- url . searchParams . delete ( 'mpLayer' ) ;
55- window . history . pushState ( { } , '' , url ) ;
51+ let urlTmp = new URL ( submitUrl ) ;
52+ if ( urlTmp . searchParams . get ( 'mpLayer' ) ) {
53+ urlTmp . searchParams . delete ( 'mpLayer' ) ;
5654 }
5755 /** change browser url */
5856 if ( typeof window . history . pushState === 'function' && ( typeof isChangeUrl === 'undefined' ) ) {
59- window . history . pushState ( { url : submitUrl } , '' , url . href ) ;
57+ window . history . pushState ( { url : submitUrl } , '' , urlTmp ) ;
6058 }
6159
6260 if ( method === 'post' ) { // For 'add to wishlist' & 'add to compare' event
@@ -70,7 +68,7 @@ define(
7068 } ) ;
7169 }
7270
73- return $ . get ( { url :submitUrl , cache :true } , { 'mpLayer' : 1 } ) . done (
71+ return $ . get ( { url :submitUrl , cache :true } , { 'mpLayer' : 1 } ) . done (
7472 function ( response ) {
7573 if ( response . backUrl ) {
7674 window . location = response . backUrl ;
You can’t perform that action at this time.
0 commit comments