propertyName, not property

This commit is contained in:
Ying Tang 2015-04-05 17:04:30 -07:00
parent e22b826bca
commit 1dbc9cf113
1 changed files with 3 additions and 2 deletions

View File

@ -131,8 +131,9 @@ function addRoute(app, uri, doc, opts) {
*/
function generateResourceDoc(opts) {
var apiInfo = _cloneDeep(opts.apiInfo);
for (var property in apiInfo) {
property = Array.isArray(property) ? property.join('') : property;
for (var propertyName in apiInfo) {
var property = apiInfo[propertyName];
apiInfo[propertyName] = Array.isArray(property) ? property.join('') : property;
}
return {