Fix wishlist view switching back to grid

This commit is contained in:
grandeljay 2022-11-25 14:02:56 +01:00
parent 8afd41adc4
commit 8d1ed9adc4

View file

@ -36,6 +36,7 @@ $(function () {
} }
/** Set wishlist style */ /** Set wishlist style */
if ($('.buttons.view .active.button[value]').length === 0) {
const orientationIsPortrait = window.matchMedia('(orientation: portrait)'); const orientationIsPortrait = window.matchMedia('(orientation: portrait)');
if (orientationIsPortrait.matches) { if (orientationIsPortrait.matches) {
@ -43,6 +44,7 @@ $(function () {
} else { } else {
$('.buttons.view .button[value="grid"]').trigger('click'); $('.buttons.view .button[value="grid"]').trigger('click');
} }
}
}, },
}; };