We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2cafbc4 commit e5bc5a7Copy full SHA for e5bc5a7
src/mixins/IsMobile.js
@@ -5,7 +5,7 @@
5
*/
6
7
// Simple mobile device/tablet detection
8
-const isMobile = !!navigator.userAgent.match(/android|iphone|ipad|ipod/i)
+const isMobile = !!(typeof navigator !== 'undefined' && navigator.userAgent.match(/android|iphone|ipad|ipod/i))
9
10
// Mixin that adds an `isMobile` data variable
11
export const IsMobile = {
0 commit comments