Fix bug with base URLs

This commit is contained in:
Sofía Aritz 2023-05-20 22:03:22 +02:00
parent b21fd3c650
commit ca16103c65

View file

@ -2,9 +2,9 @@ import {parse} from "pb-parser"
import {base_url, FontMetadata} from "./utils";
async function font_metadata_folder(folder: string, font: string, mirror: string): Promise<[string, string] | null> {
let url = base_url(mirror, folder, font) + "/METADATA.pb"
let url = base_url(mirror, folder, font)
try {
let response = await (await fetch(url))
let response = await (await fetch(url + "/METADATA.pb"))
if (response.ok) {
return [url, await response.text()]
}