We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 62fc2b7 + ef668d2 commit 5c8dee4Copy full SHA for 5c8dee4
src/components/OperatorSelect.tsx
@@ -78,7 +78,11 @@ export const OperatorSelect: FC<OperatorSelectProps> = ({
78
}
79
80
const add = (operation: OperatorInfo) => {
81
- change([...new Set([...operators, { name: operation.name }])])
+ if (!operators.some((op) => op.name === operation.name)) {
82
+ change([...operators, { name: operation.name }])
83
+ } else {
84
+ remove(operation)
85
+ }
86
87
88
const remove = (operation: OperatorInfo) => {
0 commit comments