diff --git a/app/assets/javascripts/admin/models/version-check.js.es6 b/app/assets/javascripts/admin/models/version-check.js.es6 index ba0bdf018d3..ce41d667133 100644 --- a/app/assets/javascripts/admin/models/version-check.js.es6 +++ b/app/assets/javascripts/admin/models/version-check.js.es6 @@ -19,16 +19,18 @@ const VersionCheck = Discourse.Model.extend({ @computed("git_branch", "installed_sha") gitLink(gitBranch, installedSHA) { - if (gitBranch) { + if (gitBranch && installedSHA) { return `https://github.com/discourse/discourse/compare/${installedSHA}...${gitBranch}`; - } else { + } else if (installedSHA) { return `https://github.com/discourse/discourse/tree/${installedSHA}`; } }, @computed("installed_sha") shortSha(installedSHA) { - return installedSHA.substr(0, 10); + if (installedSHA) { + return installedSHA.substr(0, 10); + } } }); diff --git a/app/assets/javascripts/admin/templates/version-checks.hbs b/app/assets/javascripts/admin/templates/version-checks.hbs index 60dd8a814b0..ced3da8b79f 100644 --- a/app/assets/javascripts/admin/templates/version-checks.hbs +++ b/app/assets/javascripts/admin/templates/version-checks.hbs @@ -6,9 +6,11 @@

{{i18n 'admin.dashboard.installed_version'}}

{{dash-if-empty versionCheck.installed_version}}

- + {{#if versionCheck.gitLink}} + + {{/if}}
{{#if versionCheck.noCheckPerformed}}