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).
This commit is contained in:
parent
eb5529eac0
commit
3604d14896
1 changed files with 9 additions and 5 deletions
14
src/jquery/jquery.js
vendored
14
src/jquery/jquery.js
vendored
|
@ -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;
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue