diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-11-29 10:10:04 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-29 10:10:04 -0800 |
commit | 6fe2b52f6860916a62bf9a4d680a0a3b91b50d91 (patch) | |
tree | 92da7f206d6945752e149a2f1af8bbb31773efec /src/state/session/index.tsx | |
parent | 9fb2c29c672f6be07410ae1ca4d7e47b6c98f914 (diff) | |
download | voidsky-6fe2b52f6860916a62bf9a4d680a0a3b91b50d91.tar.zst |
Get more rigorous about getAgent() consistency (#2026)
* Get more rigorous about getAgent() consistency * Update the feed wrapper API to use getAgent() directly
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 } |