From a7310cf59b0b93c61ab89024e46cda855a2b673c Mon Sep 17 00:00:00 2001 From: "Eevee (Evelyn Woods)" Date: Tue, 5 Jan 2021 22:38:05 -0700 Subject: [PATCH] Fix bad editor state caused by copying a selection --- js/main-editor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/main-editor.js b/js/main-editor.js index 446289c..58c5f68 100644 --- a/js/main-editor.js +++ b/js/main-editor.js @@ -2335,7 +2335,7 @@ class Selection { for (let [x, y] of this.iter_cells()) { let n = stored_level.coords_to_scalar(x, y); 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 { this.floated_cells.push(stored_level.linear_cells[n]);