Explorar el Código

StateObjectTracker, check if cell is undefined

Alexander Rose hace 6 años
padre
commit
0ca5028b8c
Se han modificado 1 ficheros con 1 adiciones y 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;
     }