From c437d750a4d2480cf880daa8a52c9d89f2dae400 Mon Sep 17 00:00:00 2001 From: Lvbo163 Date: Thu, 14 Sep 2017 11:46:36 +0800 Subject: fix swagger definition string convert error fix the convert error while tag is not defined in the string. Issue-ID: SDC-335 Change-Id: I11aa7262d8c433655d88e0641627b31b74a45162 Signed-off-by: Lvbo163 --- sdc-workflow-designer-ui/src/app/model/swagger.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sdc-workflow-designer-ui/src') diff --git a/sdc-workflow-designer-ui/src/app/model/swagger.ts b/sdc-workflow-designer-ui/src/app/model/swagger.ts index e90c5e9b..e0ed1495 100644 --- a/sdc-workflow-designer-ui/src/app/model/swagger.ts +++ b/sdc-workflow-designer-ui/src/app/model/swagger.ts @@ -124,7 +124,9 @@ export class Swagger { this.info = new SwaggerInfo(info); this.paths = this.initPaths(paths); this.swagger = swagger; - this.tags = tags.map(tag => new SwaggerTag(tag)); + if(tags) { + this.tags = tags.map(tag => new SwaggerTag(tag)); + } } private initPaths(paths: any): any { -- cgit 1.2.3-korg