Get more rigorous about getAgent() consistency (#2026)
* Get more rigorous about getAgent() consistency * Update the feed wrapper API to use getAgent() directly
This commit is contained in:
parent
9fb2c29c67
commit
6fe2b52f68
12 changed files with 70 additions and 103 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue