Skip to content

Commit c357d69

Browse files
authored
fix(web): 修复canIUse总是返回true的问题 (#5010)
1 parent aa8b3b9 commit c357d69

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

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