[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [flashproxy/master] Test window.navigator.userAgent for truth instead of against null.



commit 2bc332dc074f17c3794a79a1ceaa0bb0b0d0533a
Author: David Fifield <david@xxxxxxxxxxxxxxx>
Date:   Sat Nov 9 23:35:38 2013 -0800

    Test window.navigator.userAgent for truth instead of against null.
    
    We're about to add a patch where it can be undefined rather than null.
    See https://trac.torproject.org/projects/tor/ticket/9069#comment:8.
---
 proxy/flashproxy.js |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/proxy/flashproxy.js b/proxy/flashproxy.js
index b739464..8f73aba 100644
--- a/proxy/flashproxy.js
+++ b/proxy/flashproxy.js
@@ -429,7 +429,7 @@ function have_websocket_binary_frames() {
     var ua, matches;
 
     ua = window.navigator.userAgent;
-    if (ua === null)
+    if (!ua)
         return false;
 
     /* We are cool for Chrome 16 or Safari 6.0. */
@@ -1050,7 +1050,7 @@ function flashproxy_should_disable() {
     }
 
     ua = window.navigator.userAgent;
-    if (ua !== null) {
+    if (ua) {
         var UA_LIST = [
             /\bmobile\b/i,
             /\bandroid\b/i,



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits