diff --git a/src/utils/proxy/cached-fetch.js b/src/utils/proxy/cached-fetch.js index 0ed39562..30b00f77 100644 --- a/src/utils/proxy/cached-fetch.js +++ b/src/utils/proxy/cached-fetch.js @@ -12,7 +12,8 @@ export default async function cachedFetch(url, duration) { return cached; } - const data = await fetch(url).then((res) => res.json()); + // wrapping text in JSON.parse to handle utf-8 issues + const data = JSON.parse(await fetch(url).then((res) => res.text())); cache.put(url, data, duration * 1000 * 60); return data; }