Skip to content

Commit e4927cb

Browse files
authoredFeb 22, 2018
Merge pull request #22 from ai/patch-1
Fix Jest support
2 parents 216edb6 + 44d3895 commit e4927cb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/Trap.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import withSideEffect from 'react-side-effect';
44
import moveFocusInside, { focusInside } from 'focus-lock';
55
import { deferAction } from './util';
66

7-
const focusOnBody = () => document.activeElement !== document.body;
7+
const focusOnBody = () => document && document.activeElement !== document.body;
88

99
let lastActiveTrap = 0;
1010
let lastActiveFocus = null;

0 commit comments

Comments
 (0)
Please sign in to comment.