From 3f7c3fb40d1c9a0d1350ac35326f9da1675349c6 Mon Sep 17 00:00:00 2001 From: Roman Hotsiy Date: Fri, 15 Jul 2016 17:43:23 +0300 Subject: [PATCH] Fix crash on methods with no summary, description and operationId --- lib/services/schema-helper.service.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/services/schema-helper.service.ts b/lib/services/schema-helper.service.ts index c0445652..7156339d 100644 --- a/lib/services/schema-helper.service.ts +++ b/lib/services/schema-helper.service.ts @@ -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)) || ''; } static buildMenuTree(schema) {