Skip to content

Commit ed8a2ee

Browse files
committed
ACP2E-657: [Magento Cloud] Changing from List to Grid view showing error
1 parent d6756f9 commit ed8a2ee

File tree

1 file changed

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

1 file changed

+5
-1
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,11 @@ define([
145145
currentPage = this.getCurrentPage(),
146146
form, params, key, input, formKey, newPage;
147147

148-
if (currentPage > 1 && paramName === this.options.limit) {
148+
if (currentPage > 1 && paramName === this.options.mode) {
149+
delete paramData[this.options.page];
150+
}
151+
152+
if (currentPage > 1 && (paramName === this.options.limit || paramName === this.options.mode)) {
149153
newPage = Math.floor(this.getCurrentLimit() * (currentPage - 1) / paramValue) + 1;
150154

151155
if (newPage > 1) {

0 commit comments

Comments
 (0)