fix: config file lint error (#250)

This commit is contained in:
crazywoola 2023-05-30 10:32:26 +08:00 committed by GitHub
commit 8358d0abfa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 26 additions and 24 deletions

View file

@ -23,11 +23,12 @@ export const getLocale = (request: NextRequest): Locale => {
}
// match locale
let matchedLocale:Locale = i18n.defaultLocale
let matchedLocale: Locale = i18n.defaultLocale
try {
// If languages is ['*'], Error would happen in match function.
matchedLocale = match(languages, locales, i18n.defaultLocale) as Locale
} catch(e) {}
}
catch (e) {}
return matchedLocale
}