From d77b666da24a7ce8c9f5acbc3786328aa34961cd Mon Sep 17 00:00:00 2001 From: yugasun Date: Wed, 12 May 2021 20:26:14 +0800 Subject: [PATCH] fix: crossOrigin on IOS, close #14 --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 7336042..e5fc403 100644 --- a/src/index.ts +++ b/src/index.ts @@ -221,10 +221,10 @@ class QrcodeDecoder { imgDom = img; } else if (typeof img === 'string') { imgDom = document.createElement('img'); - imgDom.src = img; if (options.crossOrigin) { imgDom.crossOrigin = options.crossOrigin; } + imgDom.src = img; const proms = () => new Promise((resolve) => { imgDom!.onload = () => resolve(true);