forked from MapComplete/MapComplete
Scripts: fix server
This commit is contained in:
parent
8200b3b77c
commit
85205d883d
1 changed files with 2 additions and 2 deletions
|
@ -37,8 +37,8 @@ class ServerPmTileExtracts extends Script {
|
|||
body: string,
|
||||
res: ServerResponse) => {
|
||||
const [z,x,y] = path.split(".")[0].split("/").map(x => Number(x))
|
||||
if(z in zoomlevels){
|
||||
throw "Invalid zoomlevel, must be one of "+Array.from(Object.keys(zoomlevels)).join(", ")
|
||||
if(!(z in zoomlevels)){
|
||||
throw `Invalid zoomlevel ${z} (x: ${x}, y: ${y}, must be one of ${Array.from(Object.keys(zoomlevels)).join(", ")}`
|
||||
}
|
||||
|
||||
const targetFile = generator.getFilename(z, x, y)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue