mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Merge pull request #6208 from JinxiuLee/patch-2
Missed parentheses for matchMeida parameter
This commit is contained in:
@@ -177,7 +177,7 @@ var MediaQuery = React.createClass({
|
||||
},
|
||||
componentDidMount: function(){
|
||||
var checkMediaQuery = function(){
|
||||
var type = window.matchMedia("min-width: 1025px").matches ? 'desktop' : 'mobile';
|
||||
var type = window.matchMedia("(min-width: 1025px)").matches ? 'desktop' : 'mobile';
|
||||
if (type !== this.state.type){
|
||||
this.setState({type:type});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user