Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Handle local storage missing when saving peers #1954

Conversation

EmilIvanichkovv
Copy link

Problem

Trigger local storage missing error when calling savePeersToLocalStorage in nodejs

Solution

Wrap the problematic block of code with a try-catch clause to handle any potential errors.

Notes

Contribution checklist:

  • covered by unit tests;
  • covered by e2e test;
  • add ! in title if breaks public API;

@EmilIvanichkovv EmilIvanichkovv requested a review from a team as a code owner April 9, 2024 12:57
Copy link
Member

@adklempner adklempner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix the prettier error and rebase

packages/discovery/src/local-peer-cache/index.ts Outdated Show resolved Hide resolved
@EmilIvanichkovv EmilIvanichkovv force-pushed the fix/handle-local-storage-missing branch from 527db20 to 06986fb Compare April 11, 2024 12:33
@weboko weboko requested a review from adklempner April 11, 2024 14:51
@weboko weboko dismissed adklempner’s stale review April 11, 2024 15:10

Requested change addressed

@weboko
Copy link
Collaborator

weboko commented Apr 12, 2024

Closing in favor of #1956

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: localStorage is not defined
3 participants