Fixing tags check for undefined.

This commit is contained in:
John Chiu
2014-09-19 11:13:46 -07:00
parent c0b11e4719
commit 5bdc109746
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 (