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

This commit is contained in:
Yun Feng
2022-02-24 12:02:47 +11:00
committed by GitHub
parent f74b7bb28d
commit 5ae208b174

View File

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