don't call api if user doesn't have any tags

This commit is contained in:
Sean Yesmunt 2020-05-15 12:39:33 -04:00
parent 25984444ca
commit 874d7860e9
2 changed files with 6 additions and 2 deletions

View file

@ -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 });
}
};
}

View file

@ -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 });
}
};