Remove @ts-expect-error suppressions

This commit is contained in:
Sander Declerck 2025-11-03 13:57:29 +01:00
parent 932ea6b8f9
commit 14c4c4997e
No known key found for this signature in database
20 changed files with 62 additions and 79 deletions

View file

@ -71,8 +71,11 @@ async function getMalwareDatabase() {
}
const { malwareDatabase, version } = await fetchMalwareDatabase();
// @ts-expect-error version can be undefined
writeDatabaseToLocalCache(malwareDatabase, version);
if (version) {
// Only cache the malware database when we have a version.
writeDatabaseToLocalCache(malwareDatabase, version);
}
return malwareDatabase;
} catch (/** @type any */ error) {