subfield : function (code) {
var list = dojo.filter( this.subfields, function (s) {
- if (s[0] == code) return true; return true;
+ if (s[0] == code) return true; return false;
});
if (list.length == 1) return list[0];
return list;
return list;
},
- subfield : function (spec, code) { return this.field(spec)[0].subfield(code) },
+ subfield : function (spec, code) {
+ var f = this.field(spec);
+ if (dojo.isArray(f)) f = f[0];
+ return f.subfield(code)
+ },
appendFields : function () {
var me = this;