fix: add try catch to local store (#1956)

This commit is contained in:
Guru 2024-04-12 20:34:48 +05:30 committed by GitHub
parent 4607d9ea86
commit e5e8cd5e17
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 1 deletions

View File

@ -136,7 +136,11 @@ export class LocalPeerCacheDiscovery
}
private savePeersToLocalStorage(): void {
try {
localStorage.setItem("waku:peers", JSON.stringify(this.peers));
} catch (error) {
log.error("Error saving peers to local storage:", error);
}
}
}