1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 08:13:42 +00:00

formatting

This commit is contained in:
Kyle Spearrin
2019-02-02 10:06:44 -05:00
parent e7f4dccfc3
commit ff0e166755

View File

@@ -32,13 +32,12 @@ export function sequentialize(cacheKey: (args: any[]) => string) {
return response; return response;
} }
response = originalMethod.apply(this, args) response = originalMethod.apply(this, args).finally(() => {
.finally(() => { cache.delete(argsCacheKey);
cache.delete(argsCacheKey); if (cache.size === 0) {
if (cache.size === 0) { caches.delete(this);
caches.delete(this); }
} });
});
cache.set(argsCacheKey, response); cache.set(argsCacheKey, response);
return response; return response;