handleRemove(section_id, ev) {
const config_name = this.uciconfig ?? this.map.config;
- this.map.data.remove(config_name, section_id);
+ this.map.data?.remove(config_name, section_id);
return this.map.save(null, true);
},
const prevMap = mapNode ? dom.findClassInstance(mapNode) : this.map;
if (prevMap.addedSection != null && !isSaving)
- this.map.data.remove(config_name, prevMap.addedSection);
+ this.map.data?.remove(config_name, prevMap.addedSection);
delete prevMap.addedSection;
const section_id = this.section;
const config_name = this.uciconfig ?? this.map.config;
- this.map.data.remove(config_name, section_id);
+ this.map.data?.remove(config_name, section_id);
return this.map.save(null, true);
},