Make PhantomJS exit out of caniuse data matching early as it's unecessary

This commit is contained in:
Ryan Seddon
2012-08-30 15:27:26 +10:00
parent a4e882e638
commit aea240b1c6

View File

@@ -64,6 +64,10 @@ window.caniusecb = function(scriptdata) {
browserKey = JSONSelect.match('.agents .browser', scriptdata).indexOf(ua.family),
currBrowser = Object.keys(scriptdata.agents)[browserKey];
// So Phantom doesn't kill the caniuse.com matching exit out as it's useless anyway within PhantomJS
if(navigator.userAgent.indexOf("PhantomJS") != -1) {
return;
}
// translate 'y' 'n' or 'a' into a boolean that Modernizr uses
function bool(ciuresult){