dsehnal 3 년 전
부모
커밋
b230655439
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  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 */