File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -71,11 +71,11 @@ export type UtsPlatform = BuiltInPlatform | 'app-android' | 'app-ios' | 'web'
71
71
*/
72
72
export const utsPlatform = env . UNI_UTS_PLATFORM as UtsPlatform
73
73
74
- /** Detect if `process.env.UNI_PLATFORM` is `h5` */
75
- export const isH5 = platform === 'h5'
74
+ /** Detect if `process.env.UNI_PLATFORM` is `h5` or if `process.env.UNI_PLATFORM` is `web` */
75
+ export const isH5 = platform === 'h5' || platform === 'web'
76
76
77
- /** Detect if `process.env.UNI_PLATFORM` is `web` */
78
- export const isWeb = platform === 'web'
77
+ /** Detect if `process.env.UNI_PLATFORM` is `web` or if `process.env.UNI_PLATFORM` is `h5` */
78
+ export const isWeb = platform === 'web' || platform === 'h5'
79
79
80
80
/** Detect if `process.env.UNI_PLATFORM` is `app` */
81
81
export const isApp = platform === 'app'
You can’t perform that action at this time.
0 commit comments