Merge pull request #886 from mikkotikkanen/testMediaQuery

Modernizr crashes on Firefox with hidden iframe
This commit is contained in:
Stu Cox
2013-03-28 09:03:13 -07:00
2 changed files with 2 additions and 1 deletions

1
.gitignore vendored
View File

@@ -5,3 +5,4 @@ build
dist
tmp
.DS_Store
.project

View File

@@ -6,7 +6,7 @@ define(['injectElementWithStyles'], function( injectElementWithStyles ) {
var matchMedia = window.matchMedia || window.msMatchMedia;
var bool;
if ( matchMedia ) {
return matchMedia(mq).matches;
return matchMedia(mq) && matchMedia(mq).matches || false;
}
injectElementWithStyles('@media ' + mq + ' { #modernizr { position: absolute; } }', function( node ) {