Fix wishlist view switching back to grid
This commit is contained in:
parent
8afd41adc4
commit
8d1ed9adc4
1 changed files with 7 additions and 5 deletions
|
@ -36,12 +36,14 @@ $(function () {
|
|||
}
|
||||
|
||||
/** Set wishlist style */
|
||||
const orientationIsPortrait = window.matchMedia('(orientation: portrait)');
|
||||
if ($('.buttons.view .active.button[value]').length === 0) {
|
||||
const orientationIsPortrait = window.matchMedia('(orientation: portrait)');
|
||||
|
||||
if (orientationIsPortrait.matches) {
|
||||
$('.buttons.view .button[value="list"]').trigger('click');
|
||||
} else {
|
||||
$('.buttons.view .button[value="grid"]').trigger('click');
|
||||
if (orientationIsPortrait.matches) {
|
||||
$('.buttons.view .button[value="list"]').trigger('click');
|
||||
} else {
|
||||
$('.buttons.view .button[value="grid"]').trigger('click');
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue