From 7a4f35f2cd2397be3701212acfbe6b05a28e3e15 Mon Sep 17 00:00:00 2001 From: Sviatoslav Bar Date: Tue, 23 Jul 2024 15:39:04 +0300 Subject: [PATCH] fix/ error in settings [WTEL-4791] --- src/modules/settings/api/settings.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/modules/settings/api/settings.js b/src/modules/settings/api/settings.js index b50c5e67f..2d85bb013 100644 --- a/src/modules/settings/api/settings.js +++ b/src/modules/settings/api/settings.js @@ -49,7 +49,9 @@ export const getRingtonesList = async () => { const url = `${import.meta.env.VITE_RINGTONES_URL}/index.json`; try { const ringtones = await fetch(url) - .then((res) => res.json()); + .then((res) => { + if(res && res.ok) res.json() + }); return ringtones.ringtones; } catch (err) { throw applyTransform(err, [