mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-07 23:16:52 +08:00
fix(platform): prevent error with Platform.is on Android 4.4 (#18387)
This commit is contained in:
committed by
Liam DeBeasi
parent
10de1da948
commit
54bdb367c2
@ -4,7 +4,7 @@ export type Platforms = keyof typeof PLATFORMS_MAP;
|
||||
export const getPlatforms = (win: any) => setupPlatforms(win);
|
||||
|
||||
export const isPlatform = (win: Window, platform: Platforms) =>
|
||||
getPlatforms(win).includes(platform);
|
||||
getPlatforms(win).indexOf(platform) > -1;
|
||||
|
||||
export const setupPlatforms = (win: any) => {
|
||||
win.Ionic = win.Ionic || {};
|
||||
|
||||
Reference in New Issue
Block a user