X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjquery%2Fjquery.js;h=57685b31d538361db1f79ba1e3bf40c2ef3087e9;hb=3604d14896568ecdaaa232dc12380a56fa7c4b0c;hp=1d0d281339910d9b832d65fef9a8438536429cda;hpb=b9a8e65576615974228e493155c8c85dc25f09d8;p=jquery.git diff --git a/src/jquery/jquery.js b/src/jquery/jquery.js index 1d0d281..57685b3 100644 --- a/src/jquery/jquery.js +++ b/src/jquery/jquery.js @@ -811,7 +811,7 @@ jQuery.fn = jQuery.prototype = { /** * Searches for all elements that match the specified expression. - + * * This method is a good way to find additional descendant * elements with which to process. * @@ -1666,11 +1666,15 @@ jQuery.extend({ unique: function(first) { var r = [], num = jQuery.mergeNum++; - for ( var i = 0, fl = first.length; i < fl; i++ ) - if ( num != first[i].mergeNum ) { - first[i].mergeNum = num; - r.push(first[i]); - } + try { + for ( var i = 0, fl = first.length; i < fl; i++ ) + if ( num != first[i].mergeNum ) { + first[i].mergeNum = num; + r.push(first[i]); + } + } catch(e) { + r = first; + } return r; }, @@ -1811,7 +1815,7 @@ new function() { // Figure out what browser is being used jQuery.browser = { - version: b.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)[1], + version: (b.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/) || [])[1], safari: /webkit/.test(b), opera: /opera/.test(b), msie: /msie/.test(b) && !/opera/.test(b),