1
0
mirror of https://gitlab.com/bramw/baserow.git synced 2024-11-21 23:37:55 +00:00
bramw_baserow/web-frontend/modules/core/middleware/settings.js
2021-02-17 20:36:11 +00:00

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')
}
}