From bbbbc596234b736cef4d4edb4a6a6f68ceaa66b6 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. --- lib/swagger-client.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 (