forked from MapComplete/MapComplete
Fix: (attempt to) fix build
This commit is contained in:
parent
f48153145d
commit
6c9f660938
1 changed files with 4 additions and 1 deletions
|
@ -295,13 +295,16 @@ class GenerateLayouts extends Script {
|
|||
if (f.properties.type === "vector") {
|
||||
// We also need to whitelist eventual sources
|
||||
let url = f.properties.url
|
||||
urls.push(...(f.properties["connect-src"] ?? []))
|
||||
if (url.startsWith("pmtiles://")) {
|
||||
url = url.substring("pmtiles://".length)
|
||||
}
|
||||
if (url.endsWith(".pmtiles")) {
|
||||
continue
|
||||
}
|
||||
const styleSpec = await Utils.downloadJsonCached(url, 1000 * 120, {
|
||||
Origin: "https://mapcomplete.org",
|
||||
})
|
||||
urls.push(...(f.properties["connect-src"] ?? []))
|
||||
for (const key of Object.keys(styleSpec?.["sources"] ?? {})) {
|
||||
const url = styleSpec["sources"][key].url
|
||||
if (!url) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue