dsehnal 3 years ago
parent
commit
b230655439
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/mol-model/structure/structure/structure.ts

+ 2 - 2
src/mol-model/structure/structure/structure.ts

@@ -194,8 +194,8 @@ class Structure {
     }
 
     /** The parent or itself in case this is the root */
-    get root() {
-        return this.state.parent || this;
+    get root(): Structure {
+        return this.state.parent ?? this;
     }
 
     /** The root/top-most parent or `undefined` in case this is the root */