fix NaN issue for the number of active Donations (#35970)
* fixed NaN issue for the number of active Donations * Initialized activeDonations to 0 in the initial state
This commit is contained in:
committed by
Oliver Eyton-Williams
parent
db9eca1bde
commit
05de360085
@ -39,7 +39,7 @@ const initialState = {
|
||||
userProfileFetchState: {
|
||||
...defaultFetchState
|
||||
},
|
||||
sessionMeta: {},
|
||||
sessionMeta: { activeDonations: 0 },
|
||||
showDonationModal: false,
|
||||
isOnline: true
|
||||
};
|
||||
@ -167,7 +167,7 @@ export const userSelector = state => {
|
||||
export const sessionMetaSelector = state => state[ns].sessionMeta;
|
||||
export const activeDonationsSelector = state =>
|
||||
Number(sessionMetaSelector(state).activeDonations) +
|
||||
Number(PAYPAL_SUPPORTERS);
|
||||
Number(PAYPAL_SUPPORTERS || 0);
|
||||
|
||||
function spreadThePayloadOnUser(state, payload) {
|
||||
return {
|
||||
|
Reference in New Issue
Block a user