mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 16:53:34 +00:00
Prefer get methods to return single user states unless specified active (#7834)
* Prefer get methods to return single user states unless specified active * Improve comment
This commit is contained in:
@@ -22,6 +22,9 @@ export abstract class StateProvider {
|
||||
/**
|
||||
* Gets a state observable for a given key and userId.
|
||||
*
|
||||
* @remarks If userId is falsy the observable returned will point to the currently active user _and not update if the active user changes_.
|
||||
* This is different to how `getActive` works and more similar to `getUser` for whatever user happens to be active at the time of the call.
|
||||
*
|
||||
* @param keyDefinition - The key definition for the state you want to get.
|
||||
* @param userId - The userId for which you want the state for. If not provided, the state for the currently active user will be returned.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user