Skip to content

Commit

Permalink
fix(components): fix type error in story
Browse files Browse the repository at this point in the history
beta
  • Loading branch information
connor-baer committed Jun 25, 2020
1 parent 04774eb commit c32026a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/components/SelectorGroup/SelectorGroup.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,10 @@ const SelectorGroupWithState = (props: Partial<SelectorGroupProps>) => {
if (!props.multiple) {
return event.target.value;
}
return prev.includes(event.target.value)
? (prev as string[]).filter(v => v !== event.target.value)
: [...prev, event.target.value];
const prevArray = prev as string[];
return prevArray.includes(event.target.value)
? prevArray.filter(v => v !== event.target.value)
: [...prevArray, event.target.value];
});
};
return (
Expand Down

0 comments on commit c32026a

Please sign in to comment.