diff --git a/lib/swagger-client.js b/lib/swagger-client.js index 4689d5c6f7b..a02abff8236 100644 --- a/lib/swagger-client.js +++ b/lib/swagger-client.js @@ -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 (