Fix bad editor state caused by copying a selection

This commit is contained in:
Eevee (Evelyn Woods) 2021-01-05 22:38:05 -07:00
parent 3d0142310e
commit a7310cf59b

View File

@ -2335,7 +2335,7 @@ class Selection {
for (let [x, y] of this.iter_cells()) { for (let [x, y] of this.iter_cells()) {
let n = stored_level.coords_to_scalar(x, y); let n = stored_level.coords_to_scalar(x, y);
if (copy) { if (copy) {
this.floated_cells.push(stored_level.linear_cells[n].map(tile => ({...tile}))); this.floated_cells.push(stored_level.linear_cells[n].map(tile => tile ? {...tile} : null));
} }
else { else {
this.floated_cells.push(stored_level.linear_cells[n]); this.floated_cells.push(stored_level.linear_cells[n]);