Skip to content

Commit

Permalink
Merge pull request #21 from Denich/unknown-mobile
Browse files Browse the repository at this point in the history
clear tablet and phone statuses for unknown mobile. Fixes #20
  • Loading branch information
hgoebl committed Mar 22, 2015
2 parents ca137f8 + 60f0598 commit ede75ac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion generate/mobile-detect.template.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,8 @@ define(function () {
if (isMobileFallback(userAgent)) {
phoneSized = MobileDetect.isPhoneSized(maxPhoneWidth);
if (phoneSized === undefined) {
cache.mobile = cache.tablet = cache.phone = FALLBACK_MOBILE;
cache.mobile = FALLBACK_MOBILE;
cache.tablet = cache.phone = null;
} else if (phoneSized) {
cache.mobile = cache.phone = FALLBACK_PHONE;
cache.tablet = null;
Expand Down
3 changes: 2 additions & 1 deletion mobile-detect.js
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,8 @@ define(function () {
if (isMobileFallback(userAgent)) {
phoneSized = MobileDetect.isPhoneSized(maxPhoneWidth);
if (phoneSized === undefined) {
cache.mobile = cache.tablet = cache.phone = FALLBACK_MOBILE;
cache.mobile = FALLBACK_MOBILE;
cache.tablet = cache.phone = null;
} else if (phoneSized) {
cache.mobile = cache.phone = FALLBACK_PHONE;
cache.tablet = null;
Expand Down

0 comments on commit ede75ac

Please sign in to comment.