Skip to content

Commit

Permalink
Merge pull request #55 from dfeliz/enhance/default-translation
Browse files Browse the repository at this point in the history
Default language set
  • Loading branch information
dfeliz authored Jan 23, 2021
2 parents 84269d7 + 22e63c7 commit f9497e9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/pages/background/services/ChatService.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ async function getAutoSave() {

async function getTranslation() {
return ChromeStorageService.get('translationLenguage').then(({ translationLenguage }) => {
if (translationLenguage === undefined) {
return { value: 'en', label: 'Inglés' }; // default value
}
return JSON.parse(translationLenguage);
});
}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/options/services/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,4 +169,4 @@ export function getTranslation() {
resolve(response.message);
});
})
}
}

0 comments on commit f9497e9

Please sign in to comment.