This commit is contained in:
tamaina 2023-05-06 17:40:50 +00:00
parent e2ad0cd27e
commit b7827f1cae

View file

@ -7,7 +7,8 @@ onmessage = (event) => {
canvas = event.data.canvas; canvas = event.data.canvas;
} }
if (!(canvas && 'hash' in event.data && typeof event.data.hash === 'string')) { if (!(canvas && 'hash' in event.data && typeof event.data.hash === 'string')) {
return; console.error('Cannot draw blurhash without canvas and hash', canvas, event.data);
throw new Error('Cannot draw blurhash without canvas and hash');
} }
const width = event.data.width ?? 64; const width = event.data.width ?? 64;
const height = event.data.height ?? 64; const height = event.data.height ?? 64;