Skip to content

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

Fix lint issues

Tuan Dang282830e7a2d6
diff --git a/frontend/src/views/Org/MembersPage/components/OrgMachineIdentityTab/components/MachineIdentitySection/CreateClientSecretModal.tsx b/frontend/src/views/Org/MembersPage/components/OrgMachineIdentityTab/components/MachineIdentitySection/CreateClientSecretModal.tsx
index 65b60ed561..4e3961eab4 100644
--- a/frontend/src/views/Org/MembersPage/components/OrgMachineIdentityTab/components/MachineIdentitySection/CreateClientSecretModal.tsx
+++ b/frontend/src/views/Org/MembersPage/components/OrgMachineIdentityTab/components/MachineIdentitySection/CreateClientSecretModal.tsx
@@ -97,16 +97,15 @@ export const CreateClientSecretModal = ({
}: FormData) => {
try {
- if (popUpData) {
-
- const { clientSecret } = await createClientSecretMutateAsync({
- machineId: popUpData.machineId,
- description,
- ttl: Number(ttl)
- });
+ if (!popUpData?.machineId) return;
+
+ const { clientSecret } = await createClientSecretMutateAsync({
+ machineId: popUpData.machineId,
+ description,
+ ttl: Number(ttl)
+ });
- setToken(clientSecret);
- }
+ setToken(clientSecret);
createNotification({
text: "Successfully created client secret",