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 f187c00 commit 05ecb02Copy full SHA for 05ecb02
modules/Media.js
@@ -30,9 +30,10 @@ class Media extends React.Component {
30
31
componentWillMount() {
32
let { query } = this.props;
33
- const targetWindow = this.props.targetWindow || window;
34
35
- if (typeof targetWindow !== "object") return;
+ if (typeof window !== "object") return;
+
36
+ const targetWindow = this.props.targetWindow || window;
37
38
if (!targetWindow.matchMedia) {
39
throw new Error(
0 commit comments