mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 01:02:58 +00:00
If locationSet is missing include, default to worldwide include
https://github.com/openstreetmap/iD/pull/8305#discussion_r662344647
This commit is contained in:
@@ -62,10 +62,13 @@ export function coreLocations() {
|
||||
if (obj.locationSetID) return; // work was done already
|
||||
|
||||
try {
|
||||
const locationSet = obj.locationSet;
|
||||
let locationSet = obj.locationSet;
|
||||
if (!locationSet) {
|
||||
throw new Error('object missing locationSet property');
|
||||
}
|
||||
if (!locationSet.include) { // missing `include`, default to worldwide include
|
||||
locationSet.include = ['Q2']; // https://github.com/openstreetmap/iD/pull/8305#discussion_r662344647
|
||||
}
|
||||
const resolved = _loco.resolveLocationSet(locationSet);
|
||||
const locationSetID = resolved.id;
|
||||
obj.locationSetID = locationSetID;
|
||||
|
||||
Reference in New Issue
Block a user