forked from MapComplete/MapComplete
Allow disabling presets when re-using layers
This commit is contained in:
parent
db30470eca
commit
c8475068d0
1 changed files with 1 additions and 0 deletions
|
@ -215,6 +215,7 @@ export default class LayerConfig extends WithContextLoader {
|
|||
this.minzoomVisible = json.minzoomVisible ?? this.minzoom
|
||||
this.shownByDefault = json.shownByDefault ?? true
|
||||
this.forceLoad = json.forceLoad ?? false
|
||||
if (json.presets === null) json.presets = undefined
|
||||
if (json.presets !== undefined && json.presets?.map === undefined) {
|
||||
throw "Presets should be a list of items (at " + context + ")"
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue