fix a bug in Ox.filter for objects
This commit is contained in:
parent
7382d9fbb9
commit
806cbd1557
1 changed files with 1 additions and 1 deletions
|
@ -134,7 +134,7 @@ Ox.filter = function(collection, iterator, that) {
|
||||||
ret = {};
|
ret = {};
|
||||||
Ox.forEach(collection, function(value, key) {
|
Ox.forEach(collection, function(value, key) {
|
||||||
if (iterator.call(that, value, key, collection)) {
|
if (iterator.call(that, value, key, collection)) {
|
||||||
ret[value] = key;
|
ret[key] = value;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue