diff options
author | John Resig <jeresig@gmail.com> | 2007-07-20 18:08:29 +0000 |
---|---|---|
committer | John Resig <jeresig@gmail.com> | 2007-07-20 18:08:29 +0000 |
commit | 3604d14896568ecdaaa232dc12380a56fa7c4b0c (patch) | |
tree | d7b8cbe1ae568843020529d0e9209180dbfb6842 /src | |
parent | eb5529eac0f73c273ecd6ab1968b30b00c48d903 (diff) | |
download | jquery-3604d14896568ecdaaa232dc12380a56fa7c4b0c.tar.gz jquery-3604d14896568ecdaaa232dc12380a56fa7c4b0c.zip |
IE doesn't like doing attaching the mergeNum property to XML documents, so for now, we're just going to (possibly) return duplicates in IE, in XML documents. (bug #1357).
Diffstat (limited to 'src')
-rw-r--r-- | src/jquery/jquery.js | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/jquery/jquery.js b/src/jquery/jquery.js index 5e2864b31..57685b31d 100644 --- a/src/jquery/jquery.js +++ b/src/jquery/jquery.js @@ -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; }, |