From 5bdc10974618d94a47a7e24b381a6910069c6d63 Mon Sep 17 00:00:00 2001 From: John Chiu Date: Fri, 19 Sep 2014 11:13:46 -0700 Subject: [PATCH] Fixing tags check for undefined. --- dist/lib/swagger-client.js | 2 +- lib/swagger-client.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/lib/swagger-client.js b/dist/lib/swagger-client.js index 4689d5c6..a02abff8 100644 --- a/dist/lib/swagger-client.js +++ b/dist/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 ( diff --git a/lib/swagger-client.js b/lib/swagger-client.js index 4689d5c6..a02abff8 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 (