fix: Uncaught TypeError: Illegal invocation when recording incremental canvas mutation (#844)

This commit is contained in:
Yun Feng
2026-04-01 12:00:00 +08:00
committed by GitHub
parent e125c5235d
commit 5cd7a0042b

View File

@@ -60,7 +60,8 @@ export function is2DCanvasBlank(canvas: HTMLCanvasElement): boolean {
// even if we can already tell from the first chunk(s) that // even if we can already tell from the first chunk(s) that
// the canvas isn't blank // the canvas isn't blank
const pixelBuffer = new Uint32Array( const pixelBuffer = new Uint32Array(
originalGetImageData( originalGetImageData.call(
ctx,
x, x,
y, y,
Math.min(chunkSize, canvas.width - x), Math.min(chunkSize, canvas.width - x),