mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-03-14 12:18:30 +03:00
Fix toDataURL is not a function
This commit is contained in:
parent
550d1beb13
commit
bff32b2d68
1 changed files with 6 additions and 1 deletions
|
@ -2659,7 +2659,12 @@ function Card({ card, selfReferential, instance }) {
|
|||
const imageData = ctx.createImageData(w, h);
|
||||
imageData.data.set(blurhashPixels);
|
||||
ctx.putImageData(imageData, 0, 0);
|
||||
blurhashImage = canvas.toDataURL();
|
||||
if (window.OffscreenCanvas) {
|
||||
const blob = canvas.convertToBlob();
|
||||
blurhashImage = URL.createObjectURL(blob);
|
||||
} else {
|
||||
blurhashImage = canvas.toDataURL();
|
||||
}
|
||||
}
|
||||
|
||||
const isPost = isCardPost(domain);
|
||||
|
|
Loading…
Add table
Reference in a new issue