forked from MapComplete/MapComplete
Fix rendering of multianswers without explicit 'render'-field
This commit is contained in:
parent
52d9b2f452
commit
a35b80afbb
11 changed files with 195 additions and 97 deletions
|
@ -21,7 +21,7 @@ export default class TagRenderingConfig {
|
|||
addExtraTags: TagsFilter[];
|
||||
};
|
||||
|
||||
multiAnswer: boolean;
|
||||
readonly multiAnswer: boolean;
|
||||
|
||||
mappings?: {
|
||||
if: TagsFilter,
|
||||
|
@ -69,7 +69,7 @@ export default class TagRenderingConfig {
|
|||
if (mapping.then === undefined) {
|
||||
throw "Invalid mapping: if without body"
|
||||
}
|
||||
let hideInAnswer : boolean | TagsFilter = false;
|
||||
let hideInAnswer: boolean | TagsFilter = false;
|
||||
if (typeof mapping.hideInAnswer === "boolean") {
|
||||
hideInAnswer = mapping.hideInAnswer;
|
||||
} else if (mapping.hideInAnswer !== undefined) {
|
||||
|
@ -111,7 +111,8 @@ export default class TagRenderingConfig {
|
|||
}
|
||||
}
|
||||
|
||||
if (this.freeform?.key === undefined){
|
||||
|
||||
if (this.freeform?.key === undefined) {
|
||||
return this.render;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue