Skip to content

Commit e5b64d2

Browse files
committed
Render empty layout for logged out home page
Makes e2e tests happy, should eventually be replaced with some more systematic approach to how to handle logged-out pages and redirects to login page.
1 parent f8fc160 commit e5b64d2

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

client/boot/common.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import { getSections } from 'sections-helper';
2626
import { checkFormHandler } from 'lib/protect-form';
2727
import notices from 'notices';
2828
import authController from 'auth/controller';
29+
import { makeLayout, render as clientRender } from 'controller';
2930

3031
const debug = debugFactory( 'calypso' );
3132

@@ -102,9 +103,10 @@ const loggedOutMiddleware = currentUser => {
102103
}
103104
} );
104105
} else if ( config.isEnabled( 'devdocs/redirect-loggedout-homepage' ) ) {
105-
page( '/', () => {
106-
page.redirect( '/devdocs/start' );
107-
} );
106+
page( '/', '/devdocs/start' );
107+
} else {
108+
// render an empty layout with masterbar links for logged-out home page
109+
page( '/', makeLayout, clientRender );
108110
}
109111

110112
const validSections = getSections().reduce( ( acc, section ) => {

0 commit comments

Comments
 (0)