Skip to content

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

fix(pam): guard navigator access at module scope in QueryToolbar

Bernie Gandine9b83d59c583
diff --git a/frontend/src/pages/pam/PamDataExplorerPage/components/QueryToolbar.tsx b/frontend/src/pages/pam/PamDataExplorerPage/components/QueryToolbar.tsx
index 50f3d59eba..d58139743f 100644
--- a/frontend/src/pages/pam/PamDataExplorerPage/components/QueryToolbar.tsx
+++ b/frontend/src/pages/pam/PamDataExplorerPage/components/QueryToolbar.tsx
@@ -2,7 +2,7 @@ import { PlayIcon } from "lucide-react";
import { Button } from "@app/components/v3/generic/Button";
-const isMac = navigator.userAgent.includes("Mac");
+const isMac = typeof navigator !== "undefined" && navigator.userAgent.includes("Mac");
type QueryResult = {
rowCount: number | null;