From 63875316d9df4983c477600dac427f1bed899ae2 Mon Sep 17 00:00:00 2001 From: Berkeley Martinez Date: Sun, 3 Dec 2017 13:21:30 -0800 Subject: [PATCH] fix(Router): Add lang to payload if payload doesn't exist closes #16134 --- common/app/Router/redux/add-lang-enhancer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/app/Router/redux/add-lang-enhancer.js b/common/app/Router/redux/add-lang-enhancer.js index 476af0af82..ebd47f6819 100644 --- a/common/app/Router/redux/add-lang-enhancer.js +++ b/common/app/Router/redux/add-lang-enhancer.js @@ -1,7 +1,7 @@ import { langSelector } from './'; // This enhancers sole purpose is to add the lang prop to route actions so that -// they do not need to be explicitally added when using a RFR route action. +// they do not need to be explicitly added when using a RFR route action. export default function addLangToRouteEnhancer(routesMap) { return createStore => (...args) => { const store = createStore(...args); @@ -11,7 +11,7 @@ export default function addLangToRouteEnhancer(routesMap) { dispatch(action) { if ( routesMap[action.type] && - (action && action.payload && !action.payload.lang) + (!action.payload || !action.payload.lang) ) { action = { ...action,