Skip to content

Commit

Permalink
Merge pull request #721 from Nyabsi/feat/i18n-crash-fix
Browse files Browse the repository at this point in the history
Fix crash on initial launch when LocalStorage is not populated
  • Loading branch information
Geoxor authored Oct 8, 2024
2 parents 2189099 + 72c6806 commit e74eb29
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/renderer/amethyst.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { useLocalStorage } from "@vueuse/core";

export const i18n = createI18n({
fallbackLocale: "en-US", // set fallback locale
locale: JSON.parse(localStorage.getItem("settings")!).language,
locale: localStorage.getItem("settings") !== null ? JSON.parse(localStorage.getItem("settings")!).language : "en-US",
messages,
});

Expand Down

0 comments on commit e74eb29

Please sign in to comment.