Skip to content

Commit 41e7706

Browse files
author
Luke Barnard
committed
Allow team server config to be missing
, default to welcome page if either the teamToken or teamServerURL is undefined.
1 parent 2fde2d5 commit 41e7706

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎src/components/structures/HomePage.js‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ module.exports = React.createClass({
2525
displayName: 'HomePage',
2626

2727
propTypes: {
28-
// URL base of the team server.
29-
teamServerUrl: React.PropTypes.string.isRequired,
30-
// Team token. Optional. If set, used as to get the static homepage of the team
28+
// URL base of the team server. Optional.
29+
teamServerUrl: React.PropTypes.string,
30+
// Team token. Optional. If set, used to get the static homepage of the team
3131
// associated. If unset, homePageUrl will be used.
3232
teamToken: React.PropTypes.string,
3333
// URL to use as the iFrame src. Defaults to /home.html.
@@ -37,7 +37,7 @@ module.exports = React.createClass({
3737
render: function() {
3838
let src = this.props.homePageUrl || '/home.html';
3939

40-
if (this.props.teamToken) {
40+
if (this.props.teamToken && this.props.teamServerUrl) {
4141
src = `${this.props.teamServerUrl}/static/${this.props.teamToken}/home.html`;
4242
}
4343

0 commit comments

Comments
 (0)