File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
view/frontend/web/js/action Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -47,10 +47,16 @@ define(
4747 /** start loader */
4848 loader . startLoader ( ) ;
4949
50- /** change browser url */
50+ /** fix load page FPC */
51+ let urlTmp = new URL ( submitUrl ) ;
52+ if ( url . searchParams . get ( 'mpLayer' ) ) {
53+ url . searchParams . delete ( 'mpLayer' ) ;
54+ }
55+ /** change browser url */
5156 if ( typeof window . history . pushState === 'function' && ( typeof isChangeUrl === 'undefined' ) ) {
52- window . history . pushState ( { url : submitUrl } , '' , submitUrl ) ;
57+ window . history . pushState ( { url : submitUrl } , '' , urlTmp ) ;
5358 }
59+
5460 if ( method === 'post' ) { // For 'add to wishlist' & 'add to compare' event
5561 return storage . post ( submitUrl ) . done (
5662 ) . fail (
@@ -62,7 +68,7 @@ define(
6268 } ) ;
6369 }
6470
65- return storage . get ( submitUrl ) . done (
71+ return $ . get ( { url : submitUrl , cache : true } , { 'mpLayer' : 1 } ) . done (
6672 function ( response ) {
6773 if ( response . backUrl ) {
6874 window . location = response . backUrl ;
You can’t perform that action at this time.
0 commit comments