fix swagger definition string convert error 27/12327/1
authorLvbo163 <lv.bo163@zte.com.cn>
Thu, 14 Sep 2017 03:46:36 +0000 (11:46 +0800)
committerLvbo163 <lv.bo163@zte.com.cn>
Thu, 14 Sep 2017 03:46:36 +0000 (11:46 +0800)
fix the convert error while tag is not defined in the string.

Issue-ID: SDC-335

Change-Id: I11aa7262d8c433655d88e0641627b31b74a45162
Signed-off-by: Lvbo163 <lv.bo163@zte.com.cn>
sdc-workflow-designer-ui/src/app/model/swagger.ts

index e90c5e9..e0ed149 100644 (file)
@@ -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 {