Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

Commit

Permalink
Remove l10n messages from JSON response. (#3843)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenba committed Jan 8, 2018
1 parent 15891a9 commit ee837f0
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions server/src/reactrender.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ exports.render = function(req, res, page) {
cdn,
csrfToken,
abTests: req.abTests,
userLocales: req.userLocales,
messages: req.messages
userLocales: req.userLocales
}, jsonModel);
serverModel = Object.assign({
authenticated: !!req.deviceId,
Expand All @@ -41,9 +40,6 @@ exports.render = function(req, res, page) {
}
let head = ReactDOMServer.renderToStaticMarkup(viewModule.HeadFactory(serverModel));
let body;
// These messages no longer need to be sent along with the page body. (#3228)
// Deleting it here because jsonModel is used in the json repsonses above.
delete jsonModel.messages;
if (page.noBrowserJavascript) {
body = ReactDOMServer.renderToStaticMarkup(viewModule.BodyFactory(serverModel));
} else {
Expand Down

0 comments on commit ee837f0

Please # to comment.