Fix crash on methods with no summary, description and operationId

This commit is contained in:
Roman Hotsiy 2016-07-15 17:43:23 +03:00
parent dcd43e4fc6
commit 3f7c3fb40d
No known key found for this signature in database
GPG Key ID: 5CB7B3ACABA57CB0

View File

@ -221,7 +221,8 @@ export class SchemaHelper {
}
static methodSummary(method) {
return method.summary || method.operationId || method.description.substring(0, 50);
return method.summary || method.operationId ||
(method.description && method.description.substring(0, 50)) || '<no description>';
}
static buildMenuTree(schema) {