From 104c445de2018d56f0a11b6bcc8fe26886656a0f Mon Sep 17 00:00:00 2001 From: Sam Maselli Date: Tue, 14 Jan 2025 02:40:30 -0500 Subject: [PATCH] Update OutlineSelector.tsx --- .../components/gameModeSettings/OutlineSelector.tsx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/client/src/components/gameModeSettings/OutlineSelector.tsx b/client/src/components/gameModeSettings/OutlineSelector.tsx index 00c31abf0..e29aeaf57 100644 --- a/client/src/components/gameModeSettings/OutlineSelector.tsx +++ b/client/src/components/gameModeSettings/OutlineSelector.tsx @@ -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); }} />