Missed parentheses for matchMeida parameter
https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia
Jinxiu committed
Mar 8, 2016 at 11:23 UTC
2a7b50a48e653dbb24f7e7b639b0ee1c41139976
1 file changed
+1
-1
docs/docs/12-context.md
+1
-1
@@ -177,7 +177,7 @@ var MediaQuery = React.createClass({
177
},
178
componentDidMount: function(){
179
var checkMediaQuery = function(){
180
- var type = window.matchMedia("min-width: 1025px").matches ? 'desktop' : 'mobile';
180
+ var type = window.matchMedia("(min-width: 1025px)").matches ? 'desktop' : 'mobile';
181
if (type !== this.state.type){
182
this.setState({type:type});
183
}