Fix bug with base URLs
This commit is contained in:
parent
b21fd3c650
commit
ca16103c65
1 changed files with 2 additions and 2 deletions
|
@ -2,9 +2,9 @@ import {parse} from "pb-parser"
|
||||||
import {base_url, FontMetadata} from "./utils";
|
import {base_url, FontMetadata} from "./utils";
|
||||||
|
|
||||||
async function font_metadata_folder(folder: string, font: string, mirror: string): Promise<[string, string] | null> {
|
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 {
|
try {
|
||||||
let response = await (await fetch(url))
|
let response = await (await fetch(url + "/METADATA.pb"))
|
||||||
if (response.ok) {
|
if (response.ok) {
|
||||||
return [url, await response.text()]
|
return [url, await response.text()]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue