From 8ea693616d010c508f1e397f93610a4acfc0ccee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Tue, 12 Feb 2019 17:52:50 +0100 Subject: [PATCH] color-scheme: fix React warning A reducer must always return a state or null to ignore it. When the color scheme is undefined we should return the previous state. --- react/features/base/color-scheme/reducer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/react/features/base/color-scheme/reducer.js b/react/features/base/color-scheme/reducer.js index 7e0939bd0..c61baf221 100644 --- a/react/features/base/color-scheme/reducer.js +++ b/react/features/base/color-scheme/reducer.js @@ -14,7 +14,7 @@ import { SET_COLOR_SCHEME } from './actionTypes'; ReducerRegistry.register('features/base/color-scheme', (state = {}, action) => { switch (action.type) { case SET_COLOR_SCHEME: - return _.cloneDeep(action.colorScheme); + return _.cloneDeep(action.colorScheme) || state; } return state;