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({