Fix build

This commit is contained in:
pietervdvn 2022-02-28 20:58:12 +01:00
parent 191248a1ab
commit 452c1e87ca

View file

@ -116,7 +116,7 @@ export class FixImages extends DesugaringStep<LayoutConfigJson> {
this._knownImages = knownImages;
}
convert(json: LayoutConfigJson, context: string): { result: LayoutConfigJson, warnings?: [] } {
convert(json: LayoutConfigJson, context: string): { result: LayoutConfigJson, warnings?: string[] } {
let url: URL;
try {
url = new URL(json.id)
@ -125,7 +125,7 @@ export class FixImages extends DesugaringStep<LayoutConfigJson> {
return {result: json}
}
const warnings = []
const warnings: string[] = []
const absolute = url.protocol + "//" + url.host
let relative = url.protocol + "//" + url.host + url.pathname
relative = relative.substring(0, relative.lastIndexOf("/"))