mirror of
https://gitlab.com/bramw/baserow.git
synced 2024-11-21 23:37:55 +00:00
12 lines
315 B
JavaScript
12 lines
315 B
JavaScript
/**
|
|
* This middleware makes sure the settings are fetched and available in the store.
|
|
*/
|
|
export default async function ({ store, req }) {
|
|
// If nuxt generate, pass this middleware
|
|
if (process.server && !req) return
|
|
|
|
if (!store.getters['settings/isLoaded']) {
|
|
await store.dispatch('settings/load')
|
|
}
|
|
}
|