fix
This commit is contained in:
parent
3d5c068aed
commit
92201e7f13
|
@ -52,7 +52,7 @@ function draw() {
|
||||||
if (props.hash == null) return;
|
if (props.hash == null) return;
|
||||||
const pixels = decode(props.hash, width, height);
|
const pixels = decode(props.hash, width, height);
|
||||||
const ctx = canvas.getContext('2d');
|
const ctx = canvas.getContext('2d');
|
||||||
const imageData = ctx!.createImageData(props.width, props.height);
|
const imageData = ctx!.createImageData(width, height);
|
||||||
imageData.data.set(pixels);
|
imageData.data.set(pixels);
|
||||||
ctx!.putImageData(imageData, 0, 0);
|
ctx!.putImageData(imageData, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue