Fix filters

This commit is contained in:
Pieter Vander Vennet 2021-07-27 17:00:05 +02:00
parent 4b4ebc7837
commit 04c039549d
7 changed files with 338 additions and 302 deletions

View file

@ -17,7 +17,7 @@ export default class FilterConfig {
context + ".options-[" + i + "].question"
);
const osmTags = FromJSON.Tag(
option.osmTags,
option.osmTags ?? {and:[]},
`${context}.options-[${i}].osmTags`
);

View file

@ -7,5 +7,5 @@ export default interface FilterConfigJson {
* If there is only one option this will be a checkbox
* Filtering is done based on the given osmTags that are compared to the objects in that layer.
*/
options: { question: string | any; osmTags: AndOrTagConfigJson | string }[];
options: { question: string | any; osmTags?: AndOrTagConfigJson | string }[];
}