react-native-web-hover
Advanced tools
Comparing version
@@ -19,2 +19,3 @@ "use strict"; | ||
const isServer = !!(typeof process !== 'undefined' && process.release && process.release.name === 'node'); | ||
const hoverListener = createHoverListener(); | ||
@@ -96,3 +97,3 @@ | ||
// eslint-disable-next-line no-undef | ||
let hasMouse = matchMedia('(pointer:fine)').matches; // would be nice if this could be kind of map | ||
let hasMouse = isServer ? false : matchMedia('(pointer:fine)').matches; // would be nice if this could be kind of map | ||
// with the reference as key for fast lookup | ||
@@ -99,0 +100,0 @@ |
@@ -6,2 +6,3 @@ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
} from 'react-native-web'; | ||
const isServer = !!(typeof process !== 'undefined' && process.release && process.release.name === 'node'); | ||
const hoverListener = createHoverListener(); | ||
@@ -82,3 +83,3 @@ export function Hoverable({ | ||
// eslint-disable-next-line no-undef | ||
let hasMouse = matchMedia('(pointer:fine)').matches; // would be nice if this could be kind of map | ||
let hasMouse = isServer ? false : matchMedia('(pointer:fine)').matches; // would be nice if this could be kind of map | ||
// with the reference as key for fast lookup | ||
@@ -85,0 +86,0 @@ |
{ | ||
"name": "react-native-web-hover", | ||
"version": "0.2.3", | ||
"version": "0.2.4", | ||
"description": "Some enhanced elements for react-native-web to support hover on the web", | ||
@@ -5,0 +5,0 @@ "main": "lib/commonjs/index", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
56036
1.91%695
1.02%