diff options
Diffstat (limited to 'src/state/session/index.tsx')
-rw-r--r-- | src/state/session/index.tsx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/state/session/index.tsx b/src/state/session/index.tsx index 946c742ad..e6def1fab 100644 --- a/src/state/session/index.tsx +++ b/src/state/session/index.tsx @@ -13,6 +13,12 @@ import {useCloseAllActiveElements} from '#/state/util' let __globalAgent: BskyAgent = PUBLIC_BSKY_AGENT +/** + * NOTE + * Never hold on to the object returned by this function. + * Call `getAgent()` at the time of invocation to ensure + * that you never have a stale agent. + */ export function getAgent() { return __globalAgent } |