File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
view/frontend/web/js/plugin Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -171,9 +171,6 @@ IASCallbacks.prototype = {
171171 *
172172 * Copyright 2014 Webcreate (Jeroen Fiege)
173173 */
174- define ( [
175- 'jquery'
176- ] , function ( ) {
177174( function ( $ ) {
178175
179176 'use strict' ;
@@ -316,7 +313,7 @@ define([
316313 // always take the last matching item
317314 var next_url = $ ( this . nextSelector , container ) . last ( ) . attr ( 'href' ) ;
318315 if ( typeof ( next_url ) != 'undefined' ) {
319- next_url += '& ajaxscroll=1';
316+ next_url += next_url . includes ( '?' ) ? '&ajaxscroll=1' : '? ajaxscroll=1';
320317 } else {
321318 next_url = '' ;
322319 }
@@ -746,7 +743,6 @@ define([
746743 negativeMargin : 10
747744 } ;
748745} ) ( jQuery ) ;
749- } ) ;
750746if ( typeof ( IASHistoryExtension ) == "undefined" ) {
751747/**
752748 * IAS History Extension
@@ -816,7 +812,7 @@ var IASHistoryExtension = function (options) {
816812 // always take the last matching item
817813 var prev_url = jQuery ( this . prevSelector , container ) . last ( ) . attr ( 'href' ) ;
818814 if ( typeof ( prev_url ) != 'undefined' ) {
819- prev_url += '& ajaxscroll=1';
815+ prev_url += prev_url . includes ( '?' ) ? '&ajaxscroll=1' : '? ajaxscroll=1';
820816 } else {
821817 prev_url = '' ;
822818 }
You can’t perform that action at this time.
0 commit comments