Fix P2/P3 review findings: DNR redirect format, runtime type guard, cache test setup
This commit is contained in:
@@ -44,7 +44,7 @@ export class UrlCache {
|
||||
}
|
||||
|
||||
async loadFromStorage(): Promise<void> {
|
||||
const data = await chrome.storage.local.get('urlCache');
|
||||
const data = await chrome.storage.local.get('urlCache') as { urlCache: Record<string, { result: UrlCheckResult; expiresAt: number }> };
|
||||
if (data.urlCache) {
|
||||
const now = Date.now();
|
||||
for (const [key, entry] of Object.entries(data.urlCache)) {
|
||||
|
||||
Reference in New Issue
Block a user