dont use global variable

This commit is contained in:
j 2011-06-19 16:59:30 +02:00
parent b60f0c8791
commit 3eab11e967

View file

@ -746,6 +746,7 @@ Ox.map = function(obj, fn) {
var isObject = Ox.isObject(obj),
ret = isObject ? {} : [];
Ox.forEach(obj, function(val, key) {
var v;
if ((v = fn(val, key)) !== null) {
ret[isObject ? key : ret.length] = v;
}