dev.....!

This commit is contained in:
Gabe Yuan
2023-08-31 13:38:06 +08:00
parent aa795e2731
commit 4486ad353c
15 changed files with 50 additions and 41 deletions

View File

@@ -17,11 +17,11 @@ export const tryClearCaches = async () => {
* @param {*} q
* @returns
*/
export const detectLang = async (q) => {
export const tryDetectLang = async (q) => {
try {
const res = await browser?.i18n?.detectLanguage(q);
return res?.languages?.[0]?.language;
} catch (err) {
console.log("[detect lang]", err);
console.log("[detect lang]", err.message);
}
};