Skip to content

Commit b79180c

Browse files
committed
fix wishlist
1 parent 43eafbe commit b79180c

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

view/frontend/web/js/action/submit-filter.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ define(
3434

3535
return function (submitUrl, isChangeUrl) {
3636
/** save active state */
37-
var actives = [];
37+
var actives = [],
38+
data;
3839
$('.filter-options-item').each(function (index) {
3940
if ($(this).hasClass('active')) {
4041
actives.push($(this).attr('attribute'));
@@ -50,10 +51,10 @@ define(
5051
window.history.pushState({url: submitUrl}, '', submitUrl);
5152
}
5253

53-
if (typeof isChangeUrl === 'object'){
54-
var data = '{}';
54+
if (isChangeUrl){
55+
data = '{}';
5556
}else{
56-
var data = JSON.stringify({'mp_layer': 1});
57+
data = JSON.stringify({'mp_layer': 1});
5758
}
5859

5960
return storage.post(submitUrl, data).done(

0 commit comments

Comments
 (0)