Add undefined robustness

This commit is contained in:
Pieter Vander Vennet 2024-01-22 04:23:07 +01:00
parent 601e78df56
commit ddfb7988ed

View file

@ -12,7 +12,11 @@
* The names (keys) of the calculated tags. Each will normally start with an underscore (but in rare cases not) * The names (keys) of the calculated tags. Each will normally start with an underscore (but in rare cases not)
*/ */
let calculatedTags: string[] = [] let calculatedTags: string[] = []
for (const [name, _, __] of layer.calculatedTags ?? []) { for (const calculated of layer.calculatedTags ?? []) {
if(calculated){
continue
}
const name = calculated[0]
calculatedTags.push(name) calculatedTags.push(name)
} }
let knownValues: Store<string[]> = tags.map(tags => Object.keys(tags)) let knownValues: Store<string[]> = tags.map(tags => Object.keys(tags))