fix(platform): prevent error with Platform.is on Android 4.4 (#18387)

This commit is contained in:
Cezary Kluczyński
2019-06-10 16:47:23 +02:00
committed by Liam DeBeasi
parent 10de1da948
commit 54bdb367c2

View File

@ -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 || {};