From 8a06466e1697f58717e92532437be642a796d5a1 Mon Sep 17 00:00:00 2001 From: Rob Moen Date: Tue, 22 Jan 2013 12:08:19 -0800 Subject: [PATCH] Fixed check for general browser compatibility. The test below will effectively return false for all versions of IE: $client.test( { ltr: { msie: false }, rtl: { msie: false } }); Change-Id: I1bff63c0f792222741d63cfb8f03b1e0729410a7 --- resources/jquery/jquery.client.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/jquery/jquery.client.js b/resources/jquery/jquery.client.js index ae6f2b0b3a..cddd4ec2b0 100644 --- a/resources/jquery/jquery.client.js +++ b/resources/jquery/jquery.client.js @@ -203,7 +203,6 @@ var conditions, dir, i, op, val; profile = $.isPlainObject( profile ) ? profile : $.client.profile(); - dir = $( 'body' ).is( '.rtl' ) ? 'rtl' : 'ltr'; // Check over each browser condition to determine if we are running in a compatible client if ( typeof map[dir] !== 'object' || map[dir][profile.name] === undefined ) { @@ -211,12 +210,12 @@ return true; } conditions = map[dir][profile.name]; + if ( conditions === false ) { + return false; + } for ( i = 0; i < conditions.length; i++ ) { op = conditions[i][0]; val = conditions[i][1]; - if ( val === false ) { - return false; - } if ( typeof val === 'string' ) { if ( !( eval( 'profile.version' + op + '"' + val + '"' ) ) ) { return false; @@ -227,6 +226,7 @@ } } } + return true; } }; -- 2.20.1