Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5bed1f3

Browse files
jimfbzpao
authored andcommitted
Merge pull request facebook#6208 from JinxiuLee/patch-2
Missed parentheses for matchMeida parameter (cherry picked from commit f646357)
1 parent c0993bf commit 5bed1f3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/docs/12-context.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ var MediaQuery = React.createClass({
177177
},
178178
componentDidMount: function(){
179179
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';
181181
if (type !== this.state.type){
182182
this.setState({type:type});
183183
}

0 commit comments

Comments
 (0)