Skip to content

Commit e5bc5a7

Browse files
committed
RunKit fix
1 parent 2cafbc4 commit e5bc5a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mixins/IsMobile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66

77
// Simple mobile device/tablet detection
8-
const isMobile = !!navigator.userAgent.match(/android|iphone|ipad|ipod/i)
8+
const isMobile = !!(typeof navigator !== 'undefined' && navigator.userAgent.match(/android|iphone|ipad|ipod/i))
99

1010
// Mixin that adds an `isMobile` data variable
1111
export const IsMobile = {

0 commit comments

Comments
 (0)