Skip to content

Commit

Permalink
Fix issue with swaggerInit
Browse files Browse the repository at this point in the history
  • Loading branch information
scottie1984 committed Nov 19, 2020
1 parent da6d0e2 commit 5071048
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,12 @@ var generateHTML = function (swaggerDoc, opts, options, customCss, customfavIcon
}

var setup = function (swaggerDoc, opts, options, customCss, customfavIcon, swaggerUrl, customSiteTitle) {
var html = generateHTML(swaggerDoc, opts, options, customCss, customfavIcon, swaggerUrl, customSiteTitle, htmlTplString, jsTplString)
return function (req, res) {
if (req.swaggerDoc) {
var reqHtml = generateHTML(req.swaggerDoc, opts, options, customCss, customfavIcon, swaggerUrl, customSiteTitle, htmlTplString, jsTplString)
res.send(reqHtml)
} else {
var html = generateHTML(swaggerDoc, opts, options, customCss, customfavIcon, swaggerUrl, customSiteTitle, htmlTplString, jsTplString)
res.send(html)
}
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "swagger-ui-express",
"version": "4.1.4",
"version": "4.1.5",
"description": "Swagger UI Express",
"main": "./index.js",
"files": [
Expand Down

0 comments on commit 5071048

Please sign in to comment.