fix: wrong month stats and db cache undefined handling

This commit is contained in:
Samuel 2024-12-18 18:27:25 +01:00
parent ed9612fce5
commit d87d9fb301
No known key found for this signature in database
4 changed files with 54 additions and 67 deletions

View file

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