mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-03-17 01:30:27 +01:00
Fix duplicate entries in branch selector (#1794)
This commit is contained in:
@@ -56538,6 +56538,11 @@ Array [
|
||||
onChange={[Function]}
|
||||
value="uscss-prometheus"
|
||||
>
|
||||
<option
|
||||
value="uscss-prometheus"
|
||||
>
|
||||
uscss-prometheus
|
||||
</option>
|
||||
<option
|
||||
value="millennium-falcon"
|
||||
>
|
||||
|
||||
@@ -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