Remove unnecessary json parsing for presets and snippets

This commit is contained in:
Misode
2024-10-26 23:01:49 +02:00
parent e130cb59eb
commit 4d9e9fa40c
4 changed files with 12 additions and 12 deletions
+1 -1
View File
@@ -139,7 +139,7 @@ export async function fetchPreset(versionId: VersionId, registry: string, id: st
url = `${mcmeta(version, type)}/${type}/minecraft/${registry}/${id}.json`
}
const res = await fetch(url)
return await res.json()
return await res.text()
} catch (e) {
throw new Error(`Error occurred while fetching ${registry} preset ${id}: ${message(e)}`)
}