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 f9dc037 commit f187c00Copy full SHA for f187c00
modules/Media.js
@@ -19,8 +19,7 @@ class Media extends React.Component {
19
};
20
21
static defaultProps = {
22
- defaultMatches: true,
23
- targetWindow: window
+ defaultMatches: true
24
25
26
state = {
@@ -31,7 +30,7 @@ class Media extends React.Component {
31
30
32
componentWillMount() {
33
let { query } = this.props;
34
- const { targetWindow } = this.props;
+ const targetWindow = this.props.targetWindow || window;
35
36
if (typeof targetWindow !== "object") return;
37
0 commit comments