We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 216edb6 commit 44d3895Copy full SHA for 44d3895
src/Trap.js
@@ -4,7 +4,7 @@ import withSideEffect from 'react-side-effect';
4
import moveFocusInside, { focusInside } from 'focus-lock';
5
import { deferAction } from './util';
6
7
-const focusOnBody = () => document.activeElement !== document.body;
+const focusOnBody = () => document && document.activeElement !== document.body;
8
9
let lastActiveTrap = 0;
10
let lastActiveFocus = null;
0 commit comments