2 Commits d6b3bdf2aa ... 7db1608051

Author SHA1 Message Date
  bach 7db1608051 bug fix 5 months ago
  bach 45a1e25e66 bug fix 7 months ago
2 changed files with 12 additions and 10 deletions
  1. 1 1
      src/components/ConcernementMapItem.vue
  2. 11 9
      src/stores/concernements.js

+ 1 - 1
src/components/ConcernementMapItem.vue

@@ -1130,7 +1130,7 @@ export default {
 
         // use paper symbol
         let symbol_name = item_type;
-        if(parseInt(this.opened_entite_id) === entite.entite.id){
+        if(entite.entite && parseInt(this.opened_entite_id) === entite.entite.id){
           switch (item_type) {
             case 'entite':
               symbol_name = 'entite_hover'; 

+ 11 - 9
src/stores/concernements.js

@@ -389,15 +389,17 @@ export const ConcernementsStore = defineStore({
             // records and/or merge into general object and on conernement entitites_byid
             tmp_conc.entites.forEach(entite => {
               entite.cid = tmp_conc.id;
-              if (this.allEntitesById[entite.entite.id]) {
-                _assign(this.allEntitesById[entite.entite.id], entite);
-              }else{
-                this.allEntitesById[entite.entite.id] = entite;
-              }
-              if (tmp_conc.entites_byid[entite.entite.id]) {
-                _assign(tmp_conc.entites_byid[entite.entite.id], entite);
-              }else{
-                tmp_conc.entites_byid[entite.entite.id] = entite;
+              if(entite.entite){
+                if (this.allEntitesById[entite.entite.id]) {
+                  _assign(this.allEntitesById[entite.entite.id], entite);
+                }else{
+                  this.allEntitesById[entite.entite.id] = entite;
+                }
+                if (tmp_conc.entites_byid[entite.entite.id]) {
+                  _assign(tmp_conc.entites_byid[entite.entite.id], entite);
+                }else{
+                  tmp_conc.entites_byid[entite.entite.id] = entite;
+                }
               }
             });
             // add and/or merge revisions