fix: don't try to set config from non-json responses
This commit is contained in:
parent
ae2b0f97c4
commit
7c1934aad0
@ -82,6 +82,9 @@ export const useConfigStore = defineStore('config', () => {
|
|||||||
async function update(): Promise<boolean> {
|
async function update(): Promise<boolean> {
|
||||||
const HTTP = HTTPFactory()
|
const HTTP = HTTPFactory()
|
||||||
const {data: config} = await HTTP.get('info')
|
const {data: config} = await HTTP.get('info')
|
||||||
|
if (typeof config.version === 'undefined') {
|
||||||
|
return false
|
||||||
|
}
|
||||||
setConfig(objectToCamelCase(config))
|
setConfig(objectToCamelCase(config))
|
||||||
const success = !!config
|
const success = !!config
|
||||||
return success
|
return success
|
||||||
|
Loading…
x
Reference in New Issue
Block a user