From 5be41c967b014555e02e9fbed641fd4a7dc5fd86 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Thu, 4 Apr 2024 16:33:21 -0500 Subject: [PATCH] Add back local web debug, useful --- src/state/session/index.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/state/session/index.tsx b/src/state/session/index.tsx index cb84527557..6552fd7341 100644 --- a/src/state/session/index.tsx +++ b/src/state/session/index.tsx @@ -12,10 +12,12 @@ import {IS_TEST_USER} from '#/lib/constants' import {logEvent, LogEvents} from '#/lib/statsig/statsig' import {hasProp} from '#/lib/type-guards' import {logger} from '#/logger' +import {isWeb} from '#/platform/detection' import * as persisted from '#/state/persisted' import {PUBLIC_BSKY_AGENT} from '#/state/queries' import {useLoggedOutViewControls} from '#/state/shell/logged-out' import {useCloseAllActiveElements} from '#/state/util' +import {IS_DEV} from '#/env' import {emitSessionDropped} from '../events' import {readLabelers} from './agent-config' @@ -588,6 +590,11 @@ export function Provider({children}: React.PropsWithChildren<{}>) { // as we migrate, continue to keep this updated __globalAgent = agent + if (IS_DEV && isWeb) { + // @ts-ignore + window.agent = agent + } + return ( {children}