Fix cached blur

This commit is contained in:
Eduard Kuzmenko 2022-04-21 19:43:01 +03:00
parent 5c179c9222
commit 0173965a75

View File

@ -90,7 +90,9 @@ export default function blur(dataUri: string, radius: number = RADIUS, iteration
} else {
canvas.width = cached.canvas.width;
canvas.height = cached.canvas.height;
canvas.getContext('2d').drawImage(cached.canvas, 0, 0);
cached.promise.then(() => {
canvas.getContext('2d').drawImage(cached.canvas, 0, 0, canvas.width, canvas.height);
});
}
return {