fix: wrong month stats and db cache undefined handling
This commit is contained in:
parent
ed9612fce5
commit
d87d9fb301
4 changed files with 54 additions and 67 deletions
|
@ -142,7 +142,9 @@ export const cached = <T extends unknown[], R, TT>(fn: (...args: T) => R, self?:
|
|||
isPromise = promisified == newValue;
|
||||
|
||||
void promisified.then((result) => {
|
||||
cache.set(cacheName, cacheKey, result);
|
||||
if (result !== undefined) {
|
||||
cache.set(cacheName, cacheKey, result);
|
||||
}
|
||||
});
|
||||
|
||||
return newValue;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue