mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-25 00:07:47 +01:00
fix: Variant type number duplicate options (#4719)
Fixes a bug where the `number` option was shown multiple times --------- Signed-off-by: andreas-unleash <andreas@getunleash.ai>
This commit is contained in:
parent
c5791ab473
commit
be2fa68a9a
@ -199,7 +199,10 @@ export const VariantForm = ({
|
||||
const variantTypeNumber = useUiFlag('variantTypeNumber');
|
||||
|
||||
useEffect(() => {
|
||||
if (variantTypeNumber) {
|
||||
if (
|
||||
variantTypeNumber &&
|
||||
!payloadOptions.some(option => option.key === 'number')
|
||||
) {
|
||||
payloadOptions.push({ key: 'number', label: 'number' });
|
||||
}
|
||||
}, [variantTypeNumber]);
|
||||
|
Loading…
Reference in New Issue
Block a user