forked from MapComplete/MapComplete
Themes: add validation for duplicate presets, fix #1582
This commit is contained in:
parent
fc6160c760
commit
2e8a3311e7
5 changed files with 83 additions and 18 deletions
|
@ -359,7 +359,7 @@ export default class LayerConfig extends WithContextLoader {
|
|||
}
|
||||
|
||||
{
|
||||
const duplicateIds = Utils.Dupiclates(this.filters.map((f) => f.id))
|
||||
const duplicateIds = Utils.Duplicates(this.filters.map((f) => f.id))
|
||||
if (duplicateIds.length > 0) {
|
||||
throw `Some filters have a duplicate id: ${duplicateIds} (at ${context}.filters)`
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue