fix: undefined url
Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
This commit is contained in:
parent
4b05f36fcc
commit
f56cdebf19
1 changed files with 1 additions and 1 deletions
|
|
@ -111,9 +111,9 @@ export const serve_style = {
|
|||
for (const name of Object.keys(styleJSON.sources)) {
|
||||
const source = styleJSON.sources[name];
|
||||
const url = source.url;
|
||||
const protocol = url.split(':')[0];
|
||||
|
||||
if (url && (url.startsWith('pmtiles:') || url.startsWith('mbtiles:'))) {
|
||||
const protocol = url.split(':')[0];
|
||||
let dataId = url.replace('pmtiles://', '').replace('mbtiles://', '');
|
||||
|
||||
const fromData = dataId.startsWith('{') && dataId.endsWith('}');
|
||||
|
|
|
|||
Loading…
Reference in a new issue