fixed test if value is set (#2092)

fixes: #1386
This commit is contained in:
Erik Jan de Wit 2022-02-16 19:08:23 +01:00 committed by GitHub
parent 5227115f05
commit f8b3595344
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -42,7 +42,9 @@ export const TokenLifespan = ({
const onBlur = () => setFocused(false); const onBlur = () => setFocused(false);
const isExpireSet = (value: string | number) => const isExpireSet = (value: string | number) =>
(typeof value === "number" && value !== -1) || focused; (typeof value === "number" && value !== -1) ||
(typeof value === "string" && value !== "" && value !== "-1") ||
focused;
return ( return (
<FormGroup <FormGroup