forked from MapComplete/MapComplete
Studio: move some validation from throwing errors in LayerConfig.ts into errors in Validation
This commit is contained in:
parent
632dd6dfb1
commit
ec79672fa6
10 changed files with 160 additions and 79 deletions
|
@ -72,7 +72,6 @@ export default class EditLayerState {
|
|||
}
|
||||
}
|
||||
this.messages = this.configuration.mapD((config) => {
|
||||
const context = ConversionContext.construct([], ["prepare"])
|
||||
const trs = Utils.NoNull(config.tagRenderings ?? [])
|
||||
for (let i = 0; i < trs.length; i++) {
|
||||
const tr = trs[i]
|
||||
|
@ -98,6 +97,8 @@ export default class EditLayerState {
|
|||
new PrepareLayer(state),
|
||||
new ValidateLayer("dynamic", false, undefined)
|
||||
)
|
||||
|
||||
const context = ConversionContext.construct([], ["prepare"])
|
||||
prepare.convert(<LayerConfigJson>config, context)
|
||||
return context.messages
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue