Show error on hydration problem

This commit is contained in:
rijkvanzanten
2020-08-28 16:11:51 -04:00
parent 8407694cdd
commit baaaa50049
2 changed files with 16 additions and 4 deletions

View File

@@ -11,8 +11,10 @@ export const useSettingsStore = createStore({
}),
actions: {
async hydrate() {
const response = await api.get(`/settings`, { params: { fields: ['*.*'] } });
this.state.settings = response.data.data;
try {
const response = await api.get(`/settings`, { params: { fields: ['*.*'] } });
this.state.settings = response.data.data;
} catch {}
},
async dehydrate() {