Skip to content
Snippets Groups Projects
Commit 8496fa26 authored by Timothee P's avatar Timothee P :sunflower:
Browse files

prevent error in symbology if conditionnal field name changed

parent 3ca263df
No related branches found
No related tags found
1 merge request!718REDMINE_ISSUE-19031 | Disparition des signalements (affichage)
This commit is part of merge request !718. Comments created here will be created in the context of that merge request.
...@@ -215,12 +215,14 @@ export default { ...@@ -215,12 +215,14 @@ export default {
selectedFieldOptions() { selectedFieldOptions() {
if (this.selectedCustomfield) { if (this.selectedCustomfield) {
const customFieldSet = this.feature_type.customfield_set.find(el => el.name === this.selectedCustomfield); const customFieldSet = this.feature_type.customfield_set.find(el => el.name === this.selectedCustomfield);
if (customFieldSet.options.length > 0) { if (customFieldSet) {
return customFieldSet.options; if (customFieldSet.options && customFieldSet.options.length > 0) {
} else if (customFieldSet.field_type === 'char') { return customFieldSet.options;
return ['Vide', 'Non vide']; } else if (customFieldSet.field_type === 'char') {
} else if (customFieldSet.field_type === 'boolean') { return ['Vide', 'Non vide'];
return ['Décoché', 'Coché']; } else if (customFieldSet.field_type === 'boolean') {
return ['Décoché', 'Coché'];
}
} }
} }
return []; return [];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment