Permalink
Browse files

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

…sary
  • Loading branch information...
1 parent a4e882e commit aea240b1c6f8a1b103221329f173a2bf848c2993 @ryanseddon ryanseddon committed Aug 30, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 test/js/unit-caniuse.js
View
@@ -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){

0 comments on commit aea240b

Please sign in to comment.