From af0a814a55e647420988dc6da724f90b20e8a17b Mon Sep 17 00:00:00 2001 From: jessop Date: Mon, 24 Feb 2020 14:55:34 -0500 Subject: [PATCH] not sync redux defaults after clearing app data --- ui/index.jsx | 2 +- ui/redux/actions/app.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/index.jsx b/ui/index.jsx index 79633c77a..93020713c 100644 --- a/ui/index.jsx +++ b/ui/index.jsx @@ -279,7 +279,7 @@ function AppWrapper() { useEffect(() => { if (persistDone) { - app.store.dispatch(doToggle3PAnalytics()); + app.store.dispatch(doToggle3PAnalytics(null, true)); } }, [persistDone]); diff --git a/ui/redux/actions/app.js b/ui/redux/actions/app.js index afd29b9fb..465f2714c 100644 --- a/ui/redux/actions/app.js +++ b/ui/redux/actions/app.js @@ -464,7 +464,7 @@ export function doToggle3PAnalytics(allowParam, doNotDispatch) { return (dispatch, getState) => { const state = getState(); const allowState = selectAllowAnalytics(state); - const allow = allowParam !== undefined ? allowParam : allowState; + const allow = allowParam !== undefined && allowParam !== null ? allowParam : allowState; analytics.toggleThirdParty(allow); if (!doNotDispatch) { return dispatch({