Skip to content

Commit 381de9e

Browse files
committed
ACP2E-3149: Double slashes in customer segment URL
1 parent 3c5ab43 commit 381de9e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

dev/tests/js/jasmine/tests/lib/mage/adminhtml/grid.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ define(['mage/adminhtml/grid'], function () {
3030

3131
it('should reset the filter, clean the URL, and reload with the correct URL', function () {
3232
let callback = jasmine.createSpy('callback'),
33-
expectedUrl = 'https://test.com/';
33+
expectedUrl = 'https://test.com/filter/';
3434

3535
gridInstance.resetFilter(callback);
3636
expect(gridInstance.addVarToUrl).toHaveBeenCalledWith('filter', '');

lib/web/mage/adminhtml/grid.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ define([
563563
resetFilter: function (callback) {
564564
let resetUrl = this.addVarToUrl(this.filterVar, '');
565565

566-
resetUrl = resetUrl.replace('filter//', '');
566+
resetUrl = resetUrl.replace(/([^:]\/)\/+/g, '$1');
567567
this.reload(resetUrl, callback);
568568
},
569569

0 commit comments

Comments
 (0)