forked from MapComplete/MapComplete
Refactoring: introduce 'isPrivileged'
This commit is contained in:
parent
6ca055cf28
commit
f405116bb1
11 changed files with 29 additions and 28 deletions
|
|
@ -136,7 +136,7 @@ export class PrevalidateLayer extends DesugaringStep<LayerConfigJson> {
|
|||
}
|
||||
|
||||
if (json.source === "special") {
|
||||
if (!Constants.priviliged_layers.find((x) => x == json.id)) {
|
||||
if (!Constants.isPriviliged(json)) {
|
||||
context.err(
|
||||
"Layer " +
|
||||
json.id +
|
||||
|
|
@ -150,7 +150,7 @@ export class PrevalidateLayer extends DesugaringStep<LayerConfigJson> {
|
|||
json.allowMove === undefined &&
|
||||
json.source["geoJson"] === undefined
|
||||
) {
|
||||
if (!Constants.priviliged_layers.find((x) => x == json.id)) {
|
||||
if (!Constants.isPriviliged(json)) {
|
||||
context.err("Layer " + json.id + " does not have an explicit 'allowMove'")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue