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.
pull/3890/head stable/jitsi-meet_3548
Saúl Ibarra Corretgé 6 years ago committed by Saúl Ibarra Corretgé
parent 2442ef80b0
commit 8ea693616d
  1. 2
      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;

Loading…
Cancel
Save