Fix: don't show preset_type special vis if no presets are given

This commit is contained in:
Pieter Vander Vennet 2024-09-02 03:40:13 +02:00
parent dbff953096
commit cf3b4145ff

View file

@ -1996,6 +1996,9 @@ export default class SpecialVisualizations {
): BaseUIElement {
const translation = tagSource.map((tags) => {
const presets = state.layout.getMatchingLayer(tags)?.presets
if(!presets){
return undefined
}
const matchingPresets = presets
.filter((pr) => pr.description !== undefined)
.filter((pr) => new And(pr.tags).matchesProperties(tags))