fix caching logic

This commit is contained in:
Nolan Lawson 2018-03-23 08:16:46 -07:00
parent 3b03bd0e8d
commit d682982a54
1 changed files with 1 additions and 1 deletions

View File

@ -4,7 +4,7 @@
let cached let cached
export function isMobile () { export function isMobile () {
if (!cached) { if (typeof cached === 'undefined') {
cached = !!(process.browser && navigator.userAgent.match(/(iPhone|iPod|iPad|Android)/)) cached = !!(process.browser && navigator.userAgent.match(/(iPhone|iPod|iPad|Android)/))
} }
return cached return cached