Browse Source

fix(github-growth): check array length before emitting analytic (#60145)

Cathy Teng 1 year ago
parent
commit
2596c5beb7
1 changed files with 1 additions and 1 deletions
  1. 1 1
      static/app/views/settings/organizationMembers/inviteBanner.tsx

+ 1 - 1
static/app/views/settings/organizationMembers/inviteBanner.tsx

@@ -114,7 +114,7 @@ export function InviteBanner({
     }
   }, [openInviteModal, location, isEligibleForBanner]);
 
-  if (isEligibleForBanner && showBanner && missingMembers) {
+  if (isEligibleForBanner && showBanner && missingMembers.length > 0) {
     trackAnalytics('github_invite_banner.viewed', {
       organization,
       members_shown: missingMembers.slice(0, MAX_MEMBERS_TO_SHOW).length,