Permalink
Browse files

wrapped recursive call to makeRequests in setTimeout to previent "sta…

…ck overflow" in ie7
  • Loading branch information...
1 parent b21c578 commit 3c8a2f2544ca396f04b5dd335402e58f4a6a7f55 @hellolindsay hellolindsay committed Oct 19, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 respond.src.js
View
@@ -99,7 +99,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 3c8a2f2

Please sign in to comment.