mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-14 21:28:11 +02:00
fix crash when selecting some presets (#9738)
This commit is contained in:
@@ -312,7 +312,7 @@ export function presetPreset(presetID, preset, addable, allFields, allPresets) {
|
||||
let parent = allPresets[parentID];
|
||||
if (loc) {
|
||||
const validHere = locationManager.locationSetsAt(loc);
|
||||
if (parent.locationSetID && !validHere[parent.locationSetID]) {
|
||||
if (parent?.locationSetID && !validHere[parent.locationSetID]) {
|
||||
// this is a preset for which a regional variant of the main preset exists
|
||||
const candidateIDs = Object.keys(allPresets).filter(k => k.startsWith(parentID));
|
||||
parent = allPresets[candidateIDs.find(candidateID => {
|
||||
|
||||
Reference in New Issue
Block a user