From 9fea56c8a22a771b949cb5aa18ebcaf2fc799a50 Mon Sep 17 00:00:00 2001 From: bill bittner Date: Wed, 21 Feb 2018 17:34:29 -0800 Subject: [PATCH] added redirect check --- helpers/handleRender.jsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/helpers/handleRender.jsx b/helpers/handleRender.jsx index ebf59983..58b80206 100644 --- a/helpers/handleRender.jsx +++ b/helpers/handleRender.jsx @@ -25,6 +25,14 @@ module.exports = (req, res) => { ); + // check for a redirect + if (context.url) { + // Somewhere a `` was rendered + res.redirect(301, context.url); + } else { + // we're good, send the response + } + // get the initial state from our Redux store const preloadedState = store.getState();