Fix quick launch not opening with accented characters, decoding of characters in suggestions (#2802)

This commit is contained in:
shamoon
2024-02-01 00:42:22 -08:00
committed by GitHub
parent 578def33f5
commit 1ddd528bd7
2 changed files with 6 additions and 2 deletions

View File

@@ -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;
}