1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-18 09:13:33 +00:00

Special Case 0 to mean no caching at all (#10221)

This commit is contained in:
Justin Baur
2024-07-23 07:58:59 -04:00
committed by GitHub
parent 2ea2045686
commit 477294379b
5 changed files with 37 additions and 12 deletions

View File

@@ -30,9 +30,9 @@ export class UserKeyDefinition<T> {
throw new Error(`'deserializer' is a required property on key ${this.errorKeyName}`);
}
if (options.cleanupDelayMs <= 0) {
if (options.cleanupDelayMs < 0) {
throw new Error(
`'cleanupDelayMs' must be greater than 0. Value of ${options.cleanupDelayMs} passed to key ${this.errorKeyName} `,
`'cleanupDelayMs' must be greater than or equal to 0. Value of ${options.cleanupDelayMs} passed to key ${this.errorKeyName} `,
);
}