diff options
author | Lvbo163 <lv.bo163@zte.com.cn> | 2017-09-14 11:46:36 +0800 |
---|---|---|
committer | Lvbo163 <lv.bo163@zte.com.cn> | 2017-09-14 11:46:36 +0800 |
commit | c437d750a4d2480cf880daa8a52c9d89f2dae400 (patch) | |
tree | 43dd99ccca176265ca6bdd6ded2f0e68dbd5b15c /sdc-workflow-designer-ui/src | |
parent | bb91af99ee72160a29ffd84c3c5a0c65326c1209 (diff) |
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 <lv.bo163@zte.com.cn>
Diffstat (limited to 'sdc-workflow-designer-ui/src')
-rw-r--r-- | sdc-workflow-designer-ui/src/app/model/swagger.ts | 4 |
1 files changed, 3 insertions, 1 deletions
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 { |