From 05de36008593da8f9f5b387dab13d365b058120f Mon Sep 17 00:00:00 2001 From: Waseem Ahmad <42496021+waseemahmad31@users.noreply.github.com> Date: Wed, 8 May 2019 23:48:10 +0530 Subject: [PATCH] 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 --- client/src/redux/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/redux/index.js b/client/src/redux/index.js index 1e5f316120..17a89c0c66 100644 --- a/client/src/redux/index.js +++ b/client/src/redux/index.js @@ -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 {