make Ox.unique work for nodelists
This commit is contained in:
parent
64226b9a37
commit
dd7f0571a9
1 changed files with 1 additions and 0 deletions
|
@ -767,6 +767,7 @@ Ox.unique <f> Removes duplicate values from an array
|
||||||
[]
|
[]
|
||||||
@*/
|
@*/
|
||||||
Ox.unique = function(array) {
|
Ox.unique = function(array) {
|
||||||
|
array = Ox.slice(array);
|
||||||
return Ox.filter(array, function(value, index) {
|
return Ox.filter(array, function(value, index) {
|
||||||
return array.indexOf(value) == index;
|
return array.indexOf(value) == index;
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue