Skip to content

Commit

Permalink
Merge pull request #727 from webitel/fix/error-in-settings
Browse files Browse the repository at this point in the history
fix/ error in settings [WTEL-4791]
  • Loading branch information
dlohvinov authored Jul 23, 2024
2 parents 8ae831c + 7a4f35f commit 40fe691
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/modules/settings/api/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -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, [
Expand Down

0 comments on commit 40fe691

Please sign in to comment.