From 7c1934aad0e5fcd0f785896d57efc34c6df935cd Mon Sep 17 00:00:00 2001 From: kolaente Date: Wed, 5 Jul 2023 17:37:07 +0200 Subject: [PATCH] fix: don't try to set config from non-json responses --- src/stores/config.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/stores/config.ts b/src/stores/config.ts index 29e4fb37c..711bf4fd2 100644 --- a/src/stores/config.ts +++ b/src/stores/config.ts @@ -82,6 +82,9 @@ export const useConfigStore = defineStore('config', () => { async function update(): Promise { const HTTP = HTTPFactory() const {data: config} = await HTTP.get('info') + if (typeof config.version === 'undefined') { + return false + } setConfig(objectToCamelCase(config)) const success = !!config return success