mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 20:19:49 +02:00
fix: illegal json invocation
This commit is contained in:
1 parent
396b48d017
commit
42091c54b7
1 file changed
+2
-2
@@ -7,8 +7,8 @@ export async function patientFetchJSON<Type extends object>(
|
|||||||
|
|
||||||
while (patientJSON! === undefined) {
|
while (patientJSON! === undefined) {
|
||||||
try {
|
try {
|
||||||
patientJSON = (await fetch(url, options).then(({ json }) =>
|
patientJSON = (await fetch(url, options).then((response) =>
|
||||||
json(),
|
response.json(),
|
||||||
)) as Type;
|
)) as Type;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.warn(
|
console.warn(
|
||||||
|
|||||||
Reference in new issue
Block a user