Skip to content

Commit 47e4790

Browse files
authored
fix(@react-aria/dnd): add support for SSR (#3616)
1 parent ed2c240 commit 47e4790

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/@react-aria/dnd/src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ function mapModality(modality: string) {
6262
modality = 'virtual';
6363
}
6464

65-
if (modality === 'virtual' && 'ontouchstart' in window) {
65+
if (modality === 'virtual' && (typeof window !== 'undefined' && 'ontouchstart' in window)) {
6666
modality = 'touch';
6767
}
6868

0 commit comments

Comments
 (0)