Skip to content
This repository was archived by the owner on May 16, 2019. It is now read-only.

Commit 2de11ce

Browse files
committed
Fix error if no server version.
1 parent bb0cd8f commit 2de11ce

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

js/templates/aboutModal.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
<div class="about-hero modal-hero-about color-secondary-darken custCol-secondary-darken">
33
<div class="modal-hero-icon"></div>
44
<p class="width100 alignCenter custCol-text marginTop50 row5 textOpacity75 fontSize14"><%= polyglot.t('Version', {version: ob.version}) %></p>
5-
<p class="width100 alignCenter custCol-text marginTop10 textOpacity75 fontSize14"><%= polyglot.t('ServerVersion', {serverVersion: ob.serverVersion}) %></p>
5+
<% if(ob.serverVersion) { %>
6+
<p class="width100 alignCenter custCol-text marginTop10 textOpacity75 fontSize14"><%= polyglot.t('ServerVersion', {serverVersion: ob.serverVersion}) %></p>
7+
<% } %>
68
</div>
79
<div class="aboutModal-accordion accordion">
810
<div class="accordion-window">

js/views/aboutModal.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@ module.exports = baseModal.extend({
2020
throw new Error('Please provide a version.');
2121
}
2222

23-
if (!this.options.serverVersion) {
24-
throw new Error('Please provide a server version.');
25-
}
26-
2723
this._tab = this.options.initialTab;
2824
},
2925

js/views/pageNavVw.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ module.exports = baseVw.extend({
395395
if (!self.aboutModal) {
396396
self.aboutModal = new AboutModal({
397397
version: pjson.version,
398-
serverVersion: self.model.get('version'),
398+
serverVersion: self.model.get('version') || 0,
399399
});
400400
self.aboutModal.render();
401401
self.registerChild(self.aboutModal);

0 commit comments

Comments
 (0)