Skip to content
Permalink
Browse files
IE doesn't like doing attaching the mergeNum property to XML document…
…s, so for now, we're just going to (possibly) return duplicates in IE, in XML documents. (bug #1357).
  • Loading branch information
jeresig committed Jul 20, 2007
1 parent eb5529e commit 3604d14
Showing 1 changed file with 9 additions and 5 deletions.
@@ -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;
},

0 comments on commit 3604d14

Please sign in to comment.