Skip to content

Commit ad34a83

Browse files
committed
fix: error when running in Node
1 parent b285ee7 commit ad34a83

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ function normalizeEvent(e) {
3939

4040
export class Draggable {
4141
static supportPointerEvent() {
42-
return window.PointerEvent;
42+
return (typeof window !== 'undefined') && window.PointerEvent;
4343
}
4444

4545
constructor({ press = noop, drag = noop, release = noop, mouseOnly = false }) {

0 commit comments

Comments
 (0)