Browse Source

fix(alert): Fix partial member select (#26367)

In a previous PR #26160, I introduced a small bug where I would deconstruct an array into a set unnecessarily leading to some of the entries in the array not making it fully into the set.

We don't need to use ... here and that will fix the issue
David Wang 3 years ago
parent
commit
b06124aca3

+ 1 - 1
static/app/views/settings/incidentRules/ruleNameOwnerForm.tsx

@@ -39,7 +39,7 @@ class RuleNameOwnerForm extends PureComponent<Props> {
               {({model}) => {
                 const owner = model.getValue('owner');
                 const ownerId = owner && owner.split(':')[1];
-                const filteredTeamIds = new Set(...userTeamIds);
+                const filteredTeamIds = new Set(userTeamIds);
                 // Add the current team that owns the alert
                 if (ownerId) {
                   filteredTeamIds.add(ownerId);

+ 1 - 1
static/app/views/settings/projectAlerts/issueRuleEditor/index.tsx

@@ -522,7 +522,7 @@ class IssueRuleEditor extends AsyncView<Props, State> {
     // check if superuser or if user is on the alert's team
     const canEdit = isActiveSuperuser() || (ownerId ? userTeams.includes(ownerId) : true);
 
-    const filteredTeamIds = new Set(...userTeams);
+    const filteredTeamIds = new Set(userTeams);
     if (ownerId) {
       filteredTeamIds.add(ownerId);
     }