浏览代码

Fix invalid file type error

j433866 6 年之前
父节点
当前提交
99bef09e0e
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/core/operations/ParseQRCode.mjs

+ 1 - 1
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);