Skip to content

Commit 68c97df

Browse files
author
TitanSnow
committed
lint code
1 parent 47b0ce2 commit 68c97df

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/components/i18n.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,15 @@ export const dictionary = new Map([
3838
])
3939

4040
export function getText (text) {
41-
for (let language of navigator.languages) {
42-
for (let [langReg, textMapping] of dictionary) {
41+
for (const language of navigator.languages) {
42+
for (const [langReg, textMapping] of dictionary) {
4343
if (langReg.test(language)) {
44-
let result, match = null
44+
let result
45+
let match = null
4546
if (textMapping.has(text)) {
4647
result = textMapping.get(text)
4748
} else {
48-
for (let [re, res] of textMapping) {
49+
for (const [re, res] of textMapping) {
4950
if (_.isRegExp(re)) {
5051
match = re.exec(text)
5152
if (match !== null) {

0 commit comments

Comments
 (0)