Fix TypeScript complaint in Blurhash component
This commit is contained in:
committed by
nicole mikołajczyk
parent
1755fddd49
commit
72c5be1bce
@ -42,7 +42,7 @@ const Blurhash: React.FC<IBlurhash> = React.memo(({
|
||||
try {
|
||||
const pixels = decode(hash, width, height);
|
||||
const ctx = canvas.getContext('2d');
|
||||
const imageData = new ImageData(pixels, width, height);
|
||||
const imageData = new ImageData(new Uint8ClampedArray(pixels), width, height);
|
||||
|
||||
if (!ctx) return;
|
||||
ctx.putImageData(imageData, 0, 0);
|
||||
|
||||
Reference in New Issue
Block a user