mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 19:00:32 -06:00
FIX: errors in qunit tests when version check info is missing
This commit is contained in:
parent
82398907af
commit
f0586ece32
@ -19,17 +19,19 @@ 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) {
|
||||
if (installedSHA) {
|
||||
return installedSHA.substr(0, 10);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
VersionCheck.reopenClass({
|
||||
|
@ -6,9 +6,11 @@
|
||||
<div class="version-number">
|
||||
<h4>{{i18n 'admin.dashboard.installed_version'}}</h4>
|
||||
<h3>{{dash-if-empty versionCheck.installed_version}}</h3>
|
||||
{{#if versionCheck.gitLink}}
|
||||
<div class="sha-link">
|
||||
(<a href={{versionCheck.gitLink}} target="_blank">{{versionCheck.shortSha}}</a>)
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
{{#if versionCheck.noCheckPerformed}}
|
||||
|
Loading…
Reference in New Issue
Block a user