Fix bug breaking array values (name ends in [])

This commit is contained in:
Nathan Gray 2012-07-02 22:58:02 +00:00
parent 587e3c8862
commit 5385055eb9

View File

@ -401,7 +401,7 @@ etemplate2.prototype.getValues = function(_root)
// Handle arrays, eg radio[]
if(id === "")
{
id = typeof target == "undefined" ? 0 : _target.length;
id = typeof _target == "undefined" ? 0 : Object.keys(_target).length;
}
// Check whether the entry is really undefined