diff --git a/lib/core/Site.js b/lib/core/Site.js index e3b93b1a67..1bda0329c7 100644 --- a/lib/core/Site.js +++ b/lib/core/Site.js @@ -33,13 +33,11 @@ class Site extends React.Component { this.props.config.url + this.props.config.baseUrl + (this.props.url || 'index.html'); - let docsVersion = this.props.version || 'current'; + let docsVersion = this.props.version; - if (fs.existsSync(CWD + '/versions.json')) { + if (!docsVersion && fs.existsSync(CWD + '/versions.json')) { const latestVersion = require(CWD + '/versions.json')[0]; - if (docsVersion === latestVersion) { - docsVersion = 'current'; - } + docsVersion = latestVersion; } // We do not want a lang attribute for the html tag if we don't have a language set