diff --git a/src/components/structures/LoggedInView.js b/src/components/structures/LoggedInView.js index dda974e41c..45bfefefb4 100644 --- a/src/components/structures/LoggedInView.js +++ b/src/components/structures/LoggedInView.js @@ -460,10 +460,11 @@ const LoggedInView = React.createClass({ case PageTypes.HomePage: { const pagesConfig = this.props.config.pages; - let pageUrl; + let pageUrl = null; if (pagesConfig) { pageUrl = pagesConfig.homeUrl; - } else { + } + if (!pageUrl) { // This is a deprecated config option for the home page // (despite the name, given we also now have a welcome // page, which is not the same). diff --git a/src/components/views/auth/Welcome.js b/src/components/views/auth/Welcome.js index 848655d5f9..87cc6aca53 100644 --- a/src/components/views/auth/Welcome.js +++ b/src/components/views/auth/Welcome.js @@ -25,7 +25,13 @@ export default class Welcome extends React.PureComponent { const LanguageSelector = sdk.getComponent('auth.LanguageSelector'); const pagesConfig = SdkConfig.get().pages; - const pageUrl = pagesConfig ? pagesConfig.welcomeUrl : 'welcome.html'; + let pageUrl = null; + if (pagesConfig) { + pageUrl = pagesConfig.welcomeUrl; + } + if (!pageUrl) { + pageUrl = 'welcome.html'; + } return ( diff --git a/src/components/views/context_menus/TopLeftMenu.js b/src/components/views/context_menus/TopLeftMenu.js index 8459db684c..29118ed785 100644 --- a/src/components/views/context_menus/TopLeftMenu.js +++ b/src/components/views/context_menus/TopLeftMenu.js @@ -31,8 +31,8 @@ export class TopLeftMenu extends React.Component { hasHomePage() { const config = SdkConfig.get(); const pagesConfig = config.pages; - if (pagesConfig) { - return !!pagesConfig.homeUrl; + if (pagesConfig && pagesConfig.homeUrl) { + return true; } // This is a deprecated config option for the home page // (despite the name, given we also now have a welcome