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 cd0ba24 commit 126242aCopy full SHA for 126242a
lib/draggable.js
@@ -50,14 +50,14 @@ function matchesSelector(el, selector) {
50
51
// @credits: http://stackoverflow.com/questions/4817029/whats-the-best-way-to-detect-a-touch-screen-device-using-javascript/4819886#4819886
52
/* Conditional to fix node server side rendering of component */
53
-if (typeof module !== "undefined" && typeof require !== "undefined") {
+if (typeof window === 'undefined') {
54
// Do Node Stuff
55
var isTouchDevice = false;
56
-
57
} else {
58
// Do Browser Stuff
59
var isTouchDevice = 'ontouchstart' in window // works on most browsers
60
|| 'onmsgesturechange' in window; // works on ie10 on ms surface
+
61
}
62
63
// look ::handleDragStart
0 commit comments