diff --git a/client/lib/skip-agent.ts b/client/lib/skip-agent.ts index 81707c25..7f192969 100644 --- a/client/lib/skip-agent.ts +++ b/client/lib/skip-agent.ts @@ -213,11 +213,24 @@ const createSkipAgentTheme = () => { document.head.appendChild(style); }; +const isDocsPath = () => { + try { + return typeof window !== "undefined" && window.location.pathname.startsWith("/docs"); + } catch (e) { + return false; + } +}; + const isSkipAgentReachable = async (): Promise => { if (!shouldEnableSkipAgent) { return false; } + if (isDocsPath()) { + // Never check or initialize the agent from documentation routes. + return false; + } + const controller = new AbortController(); const timeout = window.setTimeout(() => controller.abort(), 4000);