diff --git a/etemplate/js/etemplate2.js b/etemplate/js/etemplate2.js index 207f0e8aa3..8564116171 100644 --- a/etemplate/js/etemplate2.js +++ b/etemplate/js/etemplate2.js @@ -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