diff --git a/src/server/object/canvas.ts b/src/server/object/canvas.ts index dfdf1d4..986d84d 100644 --- a/src/server/object/canvas.ts +++ b/src/server/object/canvas.ts @@ -37,6 +37,12 @@ export class Canvas { const color = typeof pixel === 'string' ? storeHex(pixel) : pixel; const index = to1D(x, y, this.size); + + // prevent duplicate writes + if (this._canvas[index] === color) { + return; + } + const record = { user, color,