Skip to content

Commit

Permalink
Merge pull request #804 from eo-uk:main
Browse files Browse the repository at this point in the history
fixed gazetteer error when datasets layer is missing in mapview
  • Loading branch information
RobAndrewHurst committed Jun 27, 2023
2 parents 78ad114 + bfadbbf commit 126dc6e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/utils/gazetteer.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ export function datasets(term, gazetteer) {

let layer = gazetteer.mapview.layers[gazetteer.layer || dataset.layer]

// Skip if layer defined in datasets is not added to the mapview
if (!layer) {
return;
}

// Abort current dataset query. Onload will not be called.
dataset.xhr?.abort()

Expand Down

0 comments on commit 126dc6e

Please sign in to comment.