Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dist/react-hammerjs.es.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"

// require('hammerjs') when in a browser. This is safe because Hammer is only
// invoked in componentDidMount, which is not executed on the server.
var Hammer = typeof window !== 'undefined' ? require('hammerjs') : undefined;
var Hammer = typeof window !== 'undefined' && typeof document !== 'undefined' ? require('hammerjs') : undefined;

var privateProps = {
children: true,
Expand Down
2 changes: 1 addition & 1 deletion dist/react-hammerjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"

// require('hammerjs') when in a browser. This is safe because Hammer is only
// invoked in componentDidMount, which is not executed on the server.
var Hammer = typeof window !== 'undefined' ? require('hammerjs') : undefined;
var Hammer = typeof window !== 'undefined' && typeof document !== 'undefined' ? require('hammerjs') : undefined;

var privateProps = {
children: true,
Expand Down
2 changes: 1 addition & 1 deletion dist/react-hammerjs.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/Hammer.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"

// require('hammerjs') when in a browser. This is safe because Hammer is only
// invoked in componentDidMount, which is not executed on the server.
var Hammer = typeof window !== 'undefined' ? require('hammerjs') : undefined;
var Hammer = typeof window !== 'undefined' && typeof document !== 'undefined' ? require('hammerjs') : undefined;

var privateProps = {
children: true,
Expand Down
2 changes: 1 addition & 1 deletion src/Hammer.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from 'react';

// require('hammerjs') when in a browser. This is safe because Hammer is only
// invoked in componentDidMount, which is not executed on the server.
const Hammer = typeof window !== 'undefined' ? require('hammerjs') : undefined;
const Hammer = typeof window !== 'undefined' && typeof document !== 'undefined' ? require('hammerjs') : undefined;

var privateProps = {
children: true,
Expand Down