aboutsummaryrefslogtreecommitdiffstats
path: root/src/ng/sniffer.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/ng/sniffer.js')
-rw-r--r--src/ng/sniffer.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ng/sniffer.js b/src/ng/sniffer.js
index 9a7447cb..8dcfcd7d 100644
--- a/src/ng/sniffer.js
+++ b/src/ng/sniffer.js
@@ -18,7 +18,8 @@
function $SnifferProvider() {
this.$get = ['$window', '$document', function($window, $document) {
var eventSupport = {},
- android = int((/android (\d+)/.exec(lowercase(($window.navigator || {}).userAgent)) || [])[1]),
+ android =
+ int((/android (\d+)/.exec(lowercase(($window.navigator || {}).userAgent)) || [])[1]),
boxee = /Boxee/i.test(($window.navigator || {}).userAgent),
document = $document[0] || {},
vendorPrefix,
@@ -59,7 +60,10 @@ function $SnifferProvider() {
// older webit browser (533.9) on Boxee box has exactly the same problem as Android has
// so let's not use the history API also
+ // We are purposefully using `!(android < 4)` to cover the case when `android` is undefined
+ // jshint -W018
history: !!($window.history && $window.history.pushState && !(android < 4) && !boxee),
+ // jshint +W018
hashchange: 'onhashchange' in $window &&
// IE8 compatible mode lies
(!document.documentMode || document.documentMode > 7),