Skip to content

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

Fix for "random" crash on creation

Daniel Hougaard4ab47ca1755a
diff --git a/frontend/src/layouts/AppLayout/AppLayout.tsx b/frontend/src/layouts/AppLayout/AppLayout.tsx
index 357e7c770d..9dd2d82e72 100644
--- a/frontend/src/layouts/AppLayout/AppLayout.tsx
+++ b/frontend/src/layouts/AppLayout/AppLayout.tsx
@@ -238,6 +238,9 @@ export const AppLayout = ({ children }: LayoutProps) => {
projectId: newProjectId
});
}
+
+ // eslint-disable-next-line no-promise-executor-return -- We do this because the function returns too fast, which sometimes causes an error when the user is redirected.
+ await new Promise((resolve) => setTimeout(resolve, 2_000));
// eslint-disable-next-line no-promise-executor-return -- We do this because the function returns too fast, which sometimes causes an error when the user is redirected.
await new Promise((resolve) => setTimeout(resolve, 2_000));