Explorar o código

StateObjectTracker, check if cell is undefined

Alexander Rose %!s(int64=6) %!d(string=hai) anos
pai
achega
0ca5028b8c
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/mol-state/object.ts

+ 1 - 1
src/mol-state/object.ts

@@ -111,7 +111,7 @@ export class StateObjectTracker<T extends StateObject> {
         const changed = this.cell !== cell || this.version !== version;
         this.cell = cell;
         this.version = version || '';
-        this.data = cell.obj ? cell.obj.data as T : void 0 as any;
+        this.data = cell && cell.obj ? cell.obj.data as T : void 0 as any;
         return changed;
     }