mirror of
https://github.com/hexastack/hexabot
synced 2025-06-26 18:27:28 +00:00
fix: resolve local fallback active state
This commit is contained in:
parent
fbbdda2724
commit
fb1af9839d
@ -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,
|
||||
});
|
||||
}}
|
||||
/>
|
||||
|
Loading…
Reference in New Issue
Block a user