Explorar el Código

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

bach hace 1 mes
padre
commit
f44d52bc2c
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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) => {