FIX: errors in qunit tests when version check info is missing

This commit is contained in:
Neil Lalonde
2019-09-10 16:38:23 -04:00
parent 82398907af
commit f0586ece32
2 changed files with 10 additions and 6 deletions

View File

@@ -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);
}
}
});