fix caching logic

This commit is contained in:
Nolan Lawson 2018-03-23 08:16:46 -07:00
parent 3b03bd0e8d
commit d682982a54

View file

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