Merge pull request #591 from johnkchiu/develop_2.0

Fixing tags check for undefined.
This commit is contained in:
Tony Tam
2014-09-20 09:18:32 -07:00
2 changed files with 2 additions and 2 deletions

View File

@@ -288,7 +288,7 @@ SwaggerClient.prototype.buildFromSpec = function(response) {
for(httpMethod in response.paths[path]) {
var operation = response.paths[path][httpMethod];
var tags = operation.tags;
if(typeof tags === undefined)
if(typeof tags === 'undefined')
tags = [];
var operationId = this.idFromOp(path, httpMethod, operation);
var operation = new Operation (

View File

@@ -288,7 +288,7 @@ SwaggerClient.prototype.buildFromSpec = function(response) {
for(httpMethod in response.paths[path]) {
var operation = response.paths[path][httpMethod];
var tags = operation.tags;
if(typeof tags === undefined)
if(typeof tags === 'undefined')
tags = [];
var operationId = this.idFromOp(path, httpMethod, operation);
var operation = new Operation (