From 874d7860e908f1a58559cdece7308a3973ed289b Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Fri, 15 May 2020 12:39:33 -0400 Subject: [PATCH] don't call api if user doesn't have any tags --- ui/redux/actions/app.js | 4 +++- ui/redux/actions/tags.js | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ui/redux/actions/app.js b/ui/redux/actions/app.js index f3dca608a..5cc1fc1a7 100644 --- a/ui/redux/actions/app.js +++ b/ui/redux/actions/app.js @@ -458,7 +458,9 @@ export function doAnalyticsTagSync() { const state = getState(); const tags = selectFollowedTagsList(state); const stringOfTags = tags.join(','); - analytics.apiSyncTags({ content_tags: stringOfTags }); + if (stringOfTags) { + analytics.apiSyncTags({ content_tags: stringOfTags }); + } }; } diff --git a/ui/redux/actions/tags.js b/ui/redux/actions/tags.js index fa352dd36..e631a97ac 100644 --- a/ui/redux/actions/tags.js +++ b/ui/redux/actions/tags.js @@ -9,5 +9,7 @@ export const doToggleTagFollowDesktop = (name: string) => (dispatch: Dispatch, g const state = getState(); const tags = selectFollowedTagsList(state); const stringOfTags = tags.join(','); - analytics.apiSyncTags({ content_tags: stringOfTags }); + if (stringOfTags) { + analytics.apiSyncTags({ content_tags: stringOfTags }); + } };