forked from MapComplete/MapComplete
Fix: fix carto layers
This commit is contained in:
parent
4be89ffdd3
commit
8f219244da
2 changed files with 36 additions and 19 deletions
|
@ -205,6 +205,10 @@ export default class ScriptUtils {
|
|||
headers?: any,
|
||||
timeoutSecs?: number
|
||||
): Promise<{ content: string } | { redirect: string } | "timeout"> {
|
||||
if (url === undefined || url === null) {
|
||||
console.trace("URL is null or undefined")
|
||||
throw ("Invalid url: " + url)
|
||||
}
|
||||
if (url.startsWith("./assets")) {
|
||||
return Promise.resolve({ content: readFileSync("./public/" + url, "utf8") })
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue