Fix crash when trying to change user settings

This commit is contained in:
Pieter Vander Vennet 2024-09-06 22:50:56 +02:00
parent b650dec407
commit f02a3d8392

View file

@ -926,6 +926,9 @@ export default class TagRenderingConfig {
* Might give undefined if setting to unknown is not possible
*/
public removeToSetUnknown(partOfLayer: LayerConfig, currentTags: Record<string, string>): string[] | undefined {
if(!partOfLayer?.source || !currentTags){
return
}
const toDelete = new Set<string>()
if (this.freeform) {
toDelete.add(this.freeform.key)