Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

Flatten the store of the profile feature

zbettenbukd02ab2c64192
diff --git a/react/features/base/profile/functions.js b/react/features/base/profile/functions.js
index aa289e329c..eb43c53484 100644
--- a/react/features/base/profile/functions.js
+++ b/react/features/base/profile/functions.js
@@ -11,5 +11,5 @@
export function getProfile(state: Object) {
const profileStateSlice = state['features/base/profile'];
- return profileStateSlice ? profileStateSlice.profile || {} : {};
+ return profileStateSlice || {};
}
diff --git a/react/features/base/profile/reducer.js b/react/features/base/profile/reducer.js
index d43bce1d5d..c130134240 100644
--- a/react/features/base/profile/reducer.js
+++ b/react/features/base/profile/reducer.js
@@ -5,26 +5,18 @@ import { PersistenceRegistry } from '../storage';
import { PROFILE_UPDATED } from './actionTypes';
-const DEFAULT_STATE = {
- profile: {}
-};
-
const STORE_NAME = 'features/base/profile';
/**
* Sets up the persistence of the feature base/profile.
*/
-PersistenceRegistry.register(STORE_NAME, {
- profile: true
-});
+PersistenceRegistry.register(STORE_NAME);
ReducerRegistry.register(
- STORE_NAME, (state = DEFAULT_STATE, action) => {
+ STORE_NAME, (state = {}, action) => {
switch (action.type) {
case PROFILE_UPDATED:
- return {
- profile: action.profile
- };
+ return action.profile;
}
return state;