Skip to content

Commit

Permalink
fixes #7
Browse files Browse the repository at this point in the history
  • Loading branch information
Francesco Vitullo committed Feb 8, 2015
1 parent 26f2e95 commit c9eef42
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ var assign = require('object-assign');
var omit = require('lodash.omit');
var mediaQuery = require('./mediaQuery');
var toQuery = require('./toQuery');
var matchMedia = window ? window.matchMedia : null;
var matchMedia = typeof window != 'undefined' ? window.matchMedia : null;

var defaultTypes = {
component: React.PropTypes.func,
Expand Down Expand Up @@ -79,4 +79,4 @@ var mq = React.createClass({
}
});

module.exports = mq;
module.exports = mq;

0 comments on commit c9eef42

Please sign in to comment.