From 99bef09e0e4481ac5f5b2a737c02f31225271c46 Mon Sep 17 00:00:00 2001 From: j433866 Date: Mon, 1 Apr 2019 14:13:30 +0100 Subject: [PATCH] Fix invalid file type error --- src/core/operations/ParseQRCode.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/operations/ParseQRCode.mjs b/src/core/operations/ParseQRCode.mjs index 73ffec93..16b0be4d 100644 --- a/src/core/operations/ParseQRCode.mjs +++ b/src/core/operations/ParseQRCode.mjs @@ -51,7 +51,7 @@ class ParseQRCode extends Operation { async run(input, args) { const [normalise] = args; - if (!isImage(input)) { + if (!isImage(new Uint8Array(input))) { throw new OperationError("Invalid file type."); } return await parseQrCode(input, normalise);