Permalink
Browse files

Merge remote-tracking branch 'origin/master'

# By Lindsay Bernath
# Via Lindsay Bernath (1) and Scott Jehl (1)
* origin/master:
  wrapped recursive call to makeRequests in setTimeout to previent "stack overflow" in ie7
  • Loading branch information...
2 parents 8991f5d + c1736e7 commit d6e6585ae260950e4682412b2dfb9078202a86fa Scott Jehl committed Jan 17, 2013
Showing with 4 additions and 1 deletion.
  1. +4 −1 respond.src.js
View
@@ -108,7 +108,10 @@ window.matchMedia = window.matchMedia || (function( doc, undefined ) {
ajax( thisRequest.href, function( styles ){
translate( styles, thisRequest.href, thisRequest.media );
parsedSheets[ thisRequest.href ] = true;
- makeRequests();
+
+ // by wrapping recursive function call in setTimeout
+ // we prevent "Stack overflow" error in IE7
+ setTimeout(function(){ makeRequests(); },0);
} );
}
},

0 comments on commit d6e6585

Please sign in to comment.