Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

Fix lint issue

Tuan Dang7d802b41a88a
diff --git a/frontend/src/views/Settings/ProjectSettingsPage/components/ServiceTokenV3Section/AddServiceTokenV3Modal.tsx b/frontend/src/views/Settings/ProjectSettingsPage/components/ServiceTokenV3Section/AddServiceTokenV3Modal.tsx
index 92d701661d..0745da36d5 100644
--- a/frontend/src/views/Settings/ProjectSettingsPage/components/ServiceTokenV3Section/AddServiceTokenV3Modal.tsx
+++ b/frontend/src/views/Settings/ProjectSettingsPage/components/ServiceTokenV3Section/AddServiceTokenV3Modal.tsx
@@ -64,6 +64,10 @@ const schema = yup.object({
accessTokenTTL: yup
.string()
.test("is-positive-integer", "Access Token TTL must be a positive integer", (value) => {
+ if (typeof value === "undefined") {
+ return false;
+ }
+
const num = parseInt(value, 10);
return !Number.isNaN(num) && num > 0 && String(num) === value;
})