Fix image contentType when transcoding

This commit is contained in:
Josh Perez 2021-07-27 20:09:10 -04:00 committed by GitHub
parent b7e5efe0a3
commit e7a2365905
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 78 additions and 194 deletions

View file

@ -112,9 +112,6 @@ export async function scaleImageToLevel(
throw new Error('image not a canvas');
}
({ image } = data);
if (!(image instanceof HTMLCanvasElement)) {
throw new Error('image not a canvas');
}
} catch (err) {
const error = new Error('scaleImageToLevel: Failed to process image');
error.originalError = err;