Ver Fonte

fix interUnitBonds parent check

Alexander Rose há 3 anos atrás
pai
commit
4d60b40403
1 ficheiros alterados com 3 adições e 1 exclusões
  1. 3 1
      src/mol-model/structure/structure/structure.ts

+ 3 - 1
src/mol-model/structure/structure/structure.ts

@@ -232,7 +232,9 @@ class Structure {
 
     get interUnitBonds() {
         if (this.state.interUnitBonds) return this.state.interUnitBonds;
-        if (this.parent && this.state.dynamicBonds === this.parent.state.dynamicBonds && this.parent.state.interUnitBonds?.edgeCount === 0) {
+        if (this.parent && this.state.dynamicBonds === this.parent.state.dynamicBonds &&
+            this.parent.state.interUnitBonds && this.parent.state.interUnitBonds.edgeCount === 0
+        ) {
             // no need to compute InterUnitBonds if parent's ones are empty
             this.state.interUnitBonds = new InterUnitBonds(new Map());
         } else {