This commit is contained in:
iqudoo
2026-05-02 13:50:46 +08:00
parent 1c02c72b3b
commit 6e91cc0ef4
3 changed files with 6 additions and 6 deletions

2
dist/index.js vendored

File diff suppressed because one or more lines are too long

View File

@@ -440,19 +440,19 @@ export function scanImage() {
export const supportList = [
{
name: "bridge",
support: inRuntime()
support: !!inRuntime()
},
{
name: "wx",
support: isSupportWxScan()
support: !!isSupportWxScan()
},
{
name: "web",
support: isSupportWebScan()
support: !!isSupportWebScan()
},
{
name: "image",
support: isSupportImageScan()
support: !!isSupportImageScan()
},
{
name: "scanner",

View File

@@ -330,7 +330,7 @@ export function isSupportWebScan() {
export function isSupportImageScan() {
return typeof document !== 'undefined'
&& typeof URL !== 'undefined'
&& URL.createObjectURL;
&& !!URL.createObjectURL;
}
export function stopScanForWeb() {