Skip to content

Commit

Permalink
Update OutlineSelector.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
ItsSammyM committed Jan 14, 2025
1 parent d93e3d0 commit 104c445
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions client/src/components/gameModeSettings/OutlineSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,21 +69,23 @@ export default function RoleOutlineSelector(props: RoleOutlineSelectorProps): Re
roleOrRoleSet={roleOrRoleSet}
onChange={(value) => {
let options = [...props.roleOutline];

switch (value.type) {
case "role":
options[index] = {
role: value.role,
...options[index]
winIfAny: options[index].winIfAny,
insiderGroups: options[index].insiderGroups,
role: value.role
}
break;
case "roleSet":
options[index] = {
roleSet: value.roleSet,
...options[index]
winIfAny: options[index].winIfAny,
insiderGroups: options[index].insiderGroups,
roleSet: value.roleSet
}
break;
}

props.onChange(options);
}}
/>
Expand Down

0 comments on commit 104c445

Please sign in to comment.