diff --git a/src/atoms/cell.js b/src/atoms/cell.js index 2d7f05f..9003d6a 100644 --- a/src/atoms/cell.js +++ b/src/atoms/cell.js @@ -168,6 +168,9 @@ export class CellManager { console.warn("Invalid cell data for updating cell mesh"); return; } + if (!this.cellMesh && !this.currentCell) { + return; + } // If the cell is the same as the current cell within tolerance, do nothing const eps = 1e-5; if (cell.every((row, i) => row.every((cellValue, j) => Math.abs(cellValue - this.currentCell[i][j]) < eps))) { diff --git a/tests/e2e/gui.spec.js-snapshots/Animation-frame-10-move-chromium-linux.png b/tests/e2e/gui.spec.js-snapshots/Animation-frame-10-move-chromium-linux.png index 1024d27..7f50df9 100644 Binary files a/tests/e2e/gui.spec.js-snapshots/Animation-frame-10-move-chromium-linux.png and b/tests/e2e/gui.spec.js-snapshots/Animation-frame-10-move-chromium-linux.png differ diff --git a/tests/e2e/gui.spec.js-snapshots/Cell-hide-chromium-linux.png b/tests/e2e/gui.spec.js-snapshots/Cell-hide-chromium-linux.png index 0b6d2b8..825a80d 100644 Binary files a/tests/e2e/gui.spec.js-snapshots/Cell-hide-chromium-linux.png and b/tests/e2e/gui.spec.js-snapshots/Cell-hide-chromium-linux.png differ