bug fix
- fixed a bug where the content loading logic fails when there's no translatd page
This commit is contained in:
parent
bc7aad08fd
commit
fa2a389686
1 changed files with 5 additions and 1 deletions
|
@ -67,7 +67,11 @@ const fetchContent = async (
|
|||
if (locale == "en") {
|
||||
return await import(`../../data/content${url}.json`)
|
||||
} else {
|
||||
return await import(`../../data/content${url}.${locale}.json`)
|
||||
try {
|
||||
return await import(`../../data/content${url}.${locale}.json`)
|
||||
} catch {
|
||||
return await import(`../../data/content${url}.json`)
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue