Skip to content

Commit

Permalink
fix(i18n): 修复safari 不支持先行和后行断言的导致的白屏问题
Browse files Browse the repository at this point in the history
  • Loading branch information
白唯 committed Nov 3, 2020
1 parent 379f9fb commit 384499b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/i18n/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function loadAtdLocales() {
/\.js$/
)
files.keys().forEach(key => {
const fileName = /(?<=\/)\S+(?=\.)/.exec(key) as Array<string>
const fileName = key.slice(2, key.lastIndexOf('.'))
if (includes(TranslateTable, fileName[0])) {
const localeKey = findKeyByValue(TranslateTable, fileName[0])
if (localeKey) {
Expand Down

0 comments on commit 384499b

Please sign in to comment.