Skip to content

Commit

Permalink
fix(language-menu): set "Remember language" locale unconditionally
Browse files Browse the repository at this point in the history
  • Loading branch information
caugner committed Sep 25, 2024
1 parent 3bf6894 commit 1f640ff
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,9 @@ function LocaleRedirectSetting() {
function toggle(event) {
const newValue = event.target.checked;
if (newValue) {
if (!getCookieValue(PREFERRED_LOCALE_COOKIE_NAME)) {
setCookieValue(PREFERRED_LOCALE_COOKIE_NAME, locale, {
maxAge: 60 * 60 * 24 * 365 * 3,
});
}
setCookieValue(PREFERRED_LOCALE_COOKIE_NAME, locale, {
maxAge: 60 * 60 * 24 * 365 * 3,
});
setPreferredLocale(locale);
} else {
deleteCookie(PREFERRED_LOCALE_COOKIE_NAME);
Expand Down

0 comments on commit 1f640ff

Please sign in to comment.