- fixed a bug where the content loading logic fails
  when there's no translatd page
This commit is contained in:
Kim, Jimin 2022-03-26 21:20:09 +09:00
parent bc7aad08fd
commit fa2a389686

View file

@ -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