diff --git a/src/converter.js b/src/converter.js index 086e00307..4f649511e 100644 --- a/src/converter.js +++ b/src/converter.js @@ -132,7 +132,7 @@ converter.fromObject = function fromObject(mtype) { ("if(d%s){", prop) ("if(!Array.isArray(d%s))", prop) ("throw TypeError(%j)", field.fullName + ": array expected") - ("m%s=[]", prop) + ("m%s=Array(d%s.length)", prop, prop) ("for(var i=0;i