diff --git a/src/components/ConcernementMapItem.vue b/src/components/ConcernementMapItem.vue index b5cfaf5..e26bb8d 100644 --- a/src/components/ConcernementMapItem.vue +++ b/src/components/ConcernementMapItem.vue @@ -1393,7 +1393,7 @@ export default { this.paper_main_object.scale(obj.s); // update superposition constraints points - if (this.concernement.superposition_constraints_id.length) { + if (this.concernement.superposition_constraints_id && this.concernement.superposition_constraints_id.length) { // get all the constraints of the world let all_constrains = Matter.Composite.allConstraints(this.matterEngine.world); // loop through all constraint ids recorded in the concernement @@ -1480,7 +1480,7 @@ export default { this.paper_main_object.scale(obj.s); // update superposition constraints points - if (this.concernement.superposition_constraints_id.length) { + if (this.concernement.superposition_constraints_id && this.concernement.superposition_constraints_id.length) { // get all the constraints of the world let all_constrains = Matter.Composite.allConstraints(this.matterEngine.world); // loop through all constraint ids recorded in the concernement @@ -1536,7 +1536,10 @@ export default { } if (this.opened_concernement) { - if (this.opened_concernement.id !== this.id && this.opened_concernement.superposed_concernements_id.indexOf(this.id) < 0) { + if ( + this.opened_concernement.id !== this.id + && (!this.opened_concernement.superposed_concernements_id || this.opened_concernement.superposed_concernements_id.indexOf(this.id) < 0) + ) { this.pushAside() } } else if (this.map_mode === 'proximite'