minor
This commit is contained in:
@@ -3,6 +3,7 @@ export default async (context, locale) => {
|
|||||||
if (process.server) {
|
if (process.server) {
|
||||||
return context.$axios.$get(`locale/${locale}`)
|
return context.$axios.$get(`locale/${locale}`)
|
||||||
} else {
|
} else {
|
||||||
|
// cannot use $axios here as plugins have not yet been loaded
|
||||||
return fetch(`${window.location.origin}/api/locale/${locale}`).then(ret => ret.json())
|
return fetch(`${window.location.origin}/api/locale/${locale}`).then(ret => ret.json())
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user