Fix error

This commit is contained in:
Pieter Vander Vennet 2023-11-11 14:52:01 +01:00
parent ffc8c59223
commit 7d3e5b6133
2 changed files with 13 additions and 1 deletions

View file

@ -26,7 +26,12 @@ export class LastClickFeatureSource implements WritableFeatureSource {
for (let i = 0; i < (layer.presets ?? []).length; i++) {
const preset = layer.presets[i]
const tags = new ImmutableStore(TagUtils.KVtoProperties(preset.tags))
const { html } = layer.mapRendering[0].RenderIcon(tags, {
const rendering = layer.mapRendering[0]
if (!rendering) {
console.error("NO rendering for preset", layer.id)
continue
}
const { html } = rendering.RenderIcon(tags, {
noSize: true,
includeBadges: false,
})