From 8612cb6af37fb664553b8b980918b03e82e51226 Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Mon, 15 Dec 2014 00:29:34 -0800 Subject: [PATCH] Fixed mobile detect Closes #589 --- app/js/lib/config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/js/lib/config.js b/app/js/lib/config.js index f4f38167..885efca2 100644 --- a/app/js/lib/config.js +++ b/app/js/lib/config.js @@ -42,7 +42,7 @@ Config.Navigator = { retina: window.devicePixelRatio > 1, ffos: navigator.userAgent.search(/mobi.+Gecko/i) != -1, touch: screen.width <= 768, - mobile: screen.width < 480 || navigator.userAgent.search(/iOS|iPhone OS|Android|BlackBerry|BB10|Series ?[64]0|J2ME|MIDP|opera mini|opera mobi|mobi.+Gecko|Windows Phone/i) != -1 + mobile: screen.width && screen.width < 480 || navigator.userAgent.search(/iOS|iPhone OS|Android|BlackBerry|BB10|Series ?[64]0|J2ME|MIDP|opera mini|opera mobi|mobi.+Gecko|Windows Phone/i) != -1 }; Config.I18n = {