mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-03 03:55:51 +01:00
Fix duplicate entries in branch selector (#1794)
This commit is contained in:
@@ -66,7 +66,7 @@ const InnerSelect: FC<FieldProps<BaseProps, HTMLSelectElement, string>> = ({
|
||||
const field = useInnerRef(props.innerRef);
|
||||
|
||||
let opts = options;
|
||||
if (value && addValueToOptions && options.some((o) => o.value === value)) {
|
||||
if (value && addValueToOptions && !options.some((o) => o.value === value)) {
|
||||
opts = [{ label: value, value }, ...options];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user