Skip to content

Commit

Permalink
Refactor gridContents deletion in main.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
a3510377 committed Sep 20, 2024
1 parent 37930c0 commit a254b1f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const canvas = new p5((p: p5) => {
const { x, y } = pos ?? nowPos();

if (clear === true) {
if (gridContents[x]?.[y] !== undefined) {
if (gridContents[x]?.[y]) {
delete gridContents[x][y];
}

Expand Down

0 comments on commit a254b1f

Please sign in to comment.