Permalink
Browse files

Merge branch 'webkit-detect' of https://github.com/josh/zepto into jo…

…sh-webkit-detect
  • Loading branch information...
2 parents 4b0efd9 + 5ae6cf3 commit 4add077744adf357be19828e4d5bbfc744616d74 @madrobby committed Dec 16, 2010
Showing with 3 additions and 4 deletions.
  1. +3 −4 src/detect.js
View
@@ -13,8 +13,7 @@
}
$.os = detect(navigator.userAgent);
$.__detect = detect;
- $.browser = {
- webkit: true,
- version: navigator.userAgent.match(/WebKit\/([\d.]+)/)[1]
- }
+
+ var v = navigator.userAgent.match(/WebKit\/([\d.]+)/);
+ $.browser = v ? { webkit: true, version: v[1] } : { webkit: false };
})(Zepto);

0 comments on commit 4add077

Please sign in to comment.