@@ -1,6 +1,6 @@
{
"name": "react-photo-view",
- "version": "0.3.10",
+ "version": "0.3.11",
"description": "一款精致的 React 的图片预览组件",
"author": "MinJieLiu",
"license": "MIT",
/**
* 是否支持触摸设备
*/
-const isTouchDevice = 'ontouchstart' in document.documentElement;
+const isTouchDevice = typeof document !== 'undefined' && 'ontouchstart' in document.documentElement;
export default isTouchDevice;