diff options
| -rw-r--r-- | main.js | 4 | 
1 files changed, 2 insertions, 2 deletions
@@ -539,10 +539,10 @@ if (window.location === window.parent.location) {      infoMetadataAccordions.forEach((x) => x.element.replaceChildren());      modal.show();      Promise.allSettled(Object.entries(mapLayers).map(function([grp,lyr]) { -      if (lyr.getSource() instanceof VectorTile) { +      if (lyr !== null && lyr.getSource() instanceof VectorTile) {          const url = lyr.getSource().getUrls()[0];          if (url === undefined || url.length <= 16 || url.substr(url.length - 16) !== '/{z}/{x}/{y}.pbf') { -          throw new Error(`Invalid URL ${url}`); +          return new Promise(() => { throw new Error(`Invalid URL ${url}`); });          }          return fetch(url.substr(0, url.length - 16) + '/metadata.json')            .then(function(resp0) {  | 
