fix: some type errors
All checks were successful
Deploy to SFTP Server / build (push) Successful in 6m19s
All checks were successful
Deploy to SFTP Server / build (push) Successful in 6m19s
This commit is contained in:
parent
5d59e2171d
commit
f86661bbba
@ -22,6 +22,7 @@ if (hash) {
|
||||
const smallWidth = Math.floor(image.width * scaleFactor);
|
||||
const smallHeight = Math.floor(image.height * scaleFactor);
|
||||
|
||||
//@ts-ignore
|
||||
const smallImg = await sharp(image.fsPath)
|
||||
.resize(smallWidth, smallHeight)
|
||||
.withMetadata()
|
||||
|
@ -5,7 +5,9 @@
|
||||
img.style.opacity = "1";
|
||||
img.style.filter = "blur(0px)";
|
||||
setTimeout(() => {
|
||||
img.parentNode.style.background = "";
|
||||
if (img.parentNode) {
|
||||
(img.parentNode as HTMLPictureElement).style.background = "";
|
||||
}
|
||||
}, 600);
|
||||
}
|
||||
|
||||
@ -18,7 +20,8 @@
|
||||
const hash = img.getAttribute("data-thumbhash");
|
||||
if (!hash) return;
|
||||
|
||||
const decodedString = atob(hash);
|
||||
// its only browser, why you have to be mad
|
||||
const decodedString = window.atob(hash);
|
||||
|
||||
// Create Uint8Array from decoded string
|
||||
const buffer = new Uint8Array(decodedString.length);
|
||||
|
Loading…
Reference in New Issue
Block a user