Skip to content

Commit 3253d22

Browse files
committed
fix(web): 修复canIUse总是返回true的问题
1 parent ebaf27b commit 3253d22

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/uni-h5/src/service/api/base/canIUse.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,10 @@ export const canIUse = defineSyncApi<API_TYPE_CAN_I_USE>(
3939
if (hasOwn(SCHEMA_CSS, schema)) {
4040
return SCHEMA_CSS[schema]
4141
}
42-
return true
42+
if (hasOwn(uni, schema)) {
43+
return true
44+
}
45+
return false
4346
},
4447
CanIUseProtocol
4548
)

0 commit comments

Comments
 (0)