Browse Source

bug fix: open boussole from search failed when mapitem_id different from cid

bach 1 month ago
parent
commit
f44d52bc2c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/stores/concernements.js

+ 1 - 1
src/stores/concernements.js

@@ -644,7 +644,7 @@ export const ConcernementsStore = defineStore({
     openCloseConcernements (cid, mi_id) {
       console.log(`openCloseConcernements cid: ${cid}, mi_id: ${mi_id}`);
       var state;
-      let mapitem_id = mi_id ? mi_id : this.concernementsByID[cid].mapitems_ids[0];
+      let mapitem_id = mi_id ? mi_id : cid ? this.concernementsByID[cid].mapitems_ids[this.concernementsByID[cid].mapitems_ids.length -1] : null;
       this.opened_concernement = null;
       this.opened_recit = null;
       this.concernements.forEach((c, i) => {