diff --git a/src/components/ModalSources.tsx b/src/components/ModalSources.tsx index de7bc22aa..549413fa2 100644 --- a/src/components/ModalSources.tsx +++ b/src/components/ModalSources.tsx @@ -51,7 +51,7 @@ function editorMode(source: SourceSpecification) { } if(source.type === 'vector') { if(source.tiles) return 'tilexyz_vector' - if(source.url!.startsWith("pmtiles://")) return 'pmtiles_vector' + if(source.url && source.url.startsWith("pmtiles://")) return 'pmtiles_vector' return 'tilejson_vector' } if(source.type === 'geojson') {