fix: resolve local fallback active state

This commit is contained in:
yassinedorbozgithub 2025-04-23 16:42:57 +01:00
parent fbbdda2724
commit fb1af9839d

View File

@ -70,6 +70,7 @@ const LocalFallbackInput: FC<LocalFallbackProps> = ({ value, onChange }) => {
value >= 0 ||
t("message.invalid_max_fallback_attempt_limit"),
},
valueAsNumber: true,
})}
helperText={
errors.options?.fallback?.max_attempts
@ -81,7 +82,7 @@ const LocalFallbackInput: FC<LocalFallbackProps> = ({ value, onChange }) => {
setFallback({
...fallback,
max_attempts: parseInt(e.target.value) || 0,
active: fallback.max_attempts > 0,
active: parseInt(e.target.value) > 0,
});
}}
/>