From 10980871f42da394f1d36bc52c5a794dcc8ecfab Mon Sep 17 00:00:00 2001 From: Kasper Seweryn Date: Wed, 21 Jun 2023 23:09:43 +0000 Subject: [PATCH] fix(front): add explicit check for resopnse.data Part-of: --- front/src/store/instance.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/front/src/store/instance.ts b/front/src/store/instance.ts index c0a086977..2c379d4cf 100644 --- a/front/src/store/instance.ts +++ b/front/src/store/instance.ts @@ -248,7 +248,7 @@ const store: Module = { const response = await axios.get('instance/settings/') .catch(err => logger.error('Error while fetching settings', err.response.data)) - if (!Array.isArray(response?.data)) return + if (!response?.data || !Array.isArray(response?.data)) return logger.info('Successfully fetched instance settings')