Check for Android using userAgent
Modern Android systems seem to report "Linux" for navigator.platform, so we can no longer rely on that.
This commit is contained in:
@@ -94,7 +94,8 @@ export function isIOS() {
|
||||
}
|
||||
|
||||
export function isAndroid() {
|
||||
return !!(/android/i).exec(navigator.platform);
|
||||
/* Android sets navigator.platform to Linux :/ */
|
||||
return !!navigator.userAgent.match('Android ');
|
||||
}
|
||||
|
||||
export function isChromeOS() {
|
||||
|
||||
Reference in New Issue
Block a user