Skip to content

Commit

Permalink
fix: quotes local
Browse files Browse the repository at this point in the history
  • Loading branch information
Valexr committed Apr 19, 2024
1 parent 0e231cf commit 460bd56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function createQuote() {
return {
subscribe, set, update,
async load() {
const local = navigator.languages[1] === 'ru' ? 'ru' : 'en'
const local = navigator.language.includes('ru') ? 'ru' : 'en'
const url = `./assets/quotes_${local}.json`
const res = await fetch(url);
const json = await res.json()
Expand Down

0 comments on commit 460bd56

Please sign in to comment.