fix(screenshot-capture) Add initial state (#10827)

This commit is contained in:
Robert Pintilii 2022-01-21 12:25:23 +02:00 committed by GitHub
parent 70b8bb7cbd
commit 676d7f2b93
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -8,7 +8,11 @@ PersistenceRegistry.register('features/screnshot-capture', true, {
capturesEnabled: false capturesEnabled: false
}); });
ReducerRegistry.register('features/screenshot-capture', (state = {}, action) => { const DEFAULT_STATE = {
capturesEnabled: false
};
ReducerRegistry.register('features/screenshot-capture', (state = DEFAULT_STATE, action) => {
switch (action.type) { switch (action.type) {
case SET_SCREENSHOT_CAPTURE: { case SET_SCREENSHOT_CAPTURE: {
return { return {