Fixed bug causing invalid JSON to be generated by haruki when the return value of a function was undefined.

This commit is contained in:
Michael Mathews 2010-12-17 11:13:12 +00:00
parent f97a8b5f64
commit 9b5192a233

View File

@ -45,10 +45,13 @@
'access': element.access || '',
'description': element.desc || '',
'parameters': [
],
'returns': element.returns
]
};
if (element.returns !== undefined) {
to.functions[element.name].returns = element.returns;
}
if (element.param) for (var i = 0, len = element.param.length; i < len; i++) {
thisFunction.parameters.push({
'name': element.param[i].name,