1
0
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:
✨ Audrey ✨
2024-04-19 13:12:17 -04:00
committed by GitHub
parent fffef95c5e
commit 1e67014158
3 changed files with 57 additions and 62 deletions

View File

@@ -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);