Skip to content

Commit 0bae5d5

Browse files
committed
Static Tests fix
1 parent 51a18f6 commit 0bae5d5

File tree

1 file changed

+12
-1
lines changed
  • app/code/Magento/Catalog/view/frontend/web/js/product/list

1 file changed

+12
-1
lines changed

app/code/Magento/Catalog/view/frontend/web/js/product/list/toolbar.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ define([
8181
);
8282
},
8383

84+
/**
85+
* @private
86+
*/
8487
getUrlParams: function () {
8588
var decode = window.decodeURIComponent,
8689
urlPaths = this.options.url.split('?'),
@@ -97,10 +100,18 @@ define([
97100
return params;
98101
},
99102

103+
/**
104+
* @returns {String}
105+
* @private
106+
*/
100107
getCurrentLimit: function () {
101108
return this.getUrlParams()[this.options.limit] || this.options.limitDefault;
102109
},
103110

111+
/**
112+
* @returns {String}
113+
* @private
114+
*/
104115
getCurrentPage: function () {
105116
return this.getUrlParams()[this.options.page] || 1;
106117
},
@@ -118,7 +129,7 @@ define([
118129
form, params, key, input, formKey, newPage;
119130

120131
if (currentPage > 1 && paramName === this.options.limit) {
121-
newPage = Math.floor(this.getCurrentLimit() * (currentPage-1) / paramValue) + 1;
132+
newPage = Math.floor(this.getCurrentLimit() * (currentPage - 1) / paramValue) + 1;
122133

123134
if (newPage > 1) {
124135
paramData[this.options.page] = newPage;

0 commit comments

Comments
 (0)