From eec16a2c87b21c5c55c39c227d7cb754cabfa527 Mon Sep 17 00:00:00 2001 From: Kailash Bhalaki Date: Mon, 16 Dec 2019 12:31:46 +0530 Subject: [PATCH] Change isMobile util function. --- app/utils/client/lib/isMobile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/utils/client/lib/isMobile.js b/app/utils/client/lib/isMobile.js index 8dc0fc549552..94bb8cb74b00 100644 --- a/app/utils/client/lib/isMobile.js +++ b/app/utils/client/lib/isMobile.js @@ -1,5 +1,5 @@ export const isMobile = () => { - if (/Mobi/.test(navigator.userAgent)) { + if (window.matchMedia('(max-width: 500px)').matches) { return true; } return false;