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'
7171 */
7272export const utsPlatform = env . UNI_UTS_PLATFORM as UtsPlatform
7373
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'
7676
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'
7979
8080/** Detect if `process.env.UNI_PLATFORM` is `app` */
8181export const isApp = platform === 'app'
You can’t perform that action at this time.
0 commit comments