mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 08:13:42 +00:00
fix update loop when overwriting state from buffer (#8834)
This commit is contained in:
@@ -87,9 +87,13 @@ export class BufferedKeyDefinition<Input, Output = Input, Dependency = true> {
|
||||
}
|
||||
|
||||
/** Checks whether the input type can be converted to the output type.
|
||||
* @returns `true` if the definition is valid, otherwise `false`.
|
||||
* @returns `true` if the definition is defined and valid, otherwise `false`.
|
||||
*/
|
||||
isValid(input: Input, dependency: Dependency) {
|
||||
if (input === null) {
|
||||
return Promise.resolve(false);
|
||||
}
|
||||
|
||||
const isValid = this.options?.isValid;
|
||||
if (isValid) {
|
||||
return isValid(input, dependency);
|
||||
|
||||
Reference in New Issue
Block a user