rename variable requestJson when it's not actually json

This commit is contained in:
Shpuld Shpuldson 2020-06-27 12:59:24 +03:00
parent a8cb5e71d9
commit 46cf50a4d6
1 changed files with 3 additions and 3 deletions

View File

@ -25,11 +25,11 @@ const preloadFetch = async (request) => {
if (!data || !data[request]) {
return window.fetch(request)
}
const requestJson = atob(data[request])
const requestData = atob(data[request])
return {
ok: true,
json: () => JSON.parse(requestJson),
text: () => requestJson
json: () => JSON.parse(requestData),
text: () => requestData
}
}