in Ox.values, handle nodelists (so that Ox.some(nodelist, test) doesn't fail)

This commit is contained in:
rolux 2013-12-04 12:59:29 +01:00
parent 4471a8657f
commit 6e5105025c

View file

@ -572,7 +572,7 @@ Ox.values <f> Returns the values of a collection
@*/ @*/
Ox.values = function(collection) { Ox.values = function(collection) {
var ret, type = Ox.typeOf(collection); var ret, type = Ox.typeOf(collection);
if (type == 'array') { if (type == 'array' || type == 'nodelist') {
ret = Ox.clone(collection); ret = Ox.clone(collection);
} else if (type == 'object' || type == 'storage') { } else if (type == 'object' || type == 'storage') {
ret = []; ret = [];