Skip to content

fix: resolve 'tag_name' error when offline in GithubUpdateChecker#1729

Open
luqs1 wants to merge 1 commit into
lnreader:masterfrom
luqs1:fix/offline-update-check-error
Open

fix: resolve 'tag_name' error when offline in GithubUpdateChecker#1729
luqs1 wants to merge 1 commit into
lnreader:masterfrom
luqs1:fix/offline-update-check-error

Conversation

@luqs1

@luqs1 luqs1 commented Jan 29, 2026

Copy link
Copy Markdown

Summary

This PR fixes a TypeError: Cannot read property 'tag_name' of undefined that occurs when the app is offline.

Changes

  • Added defensive checks in useGithubUpdateChecker to ensure latestRelease and tag_name exist before use.
  • Refactored useGithubUpdateChecker return logic for better robustness.
  • Wrapped internal version check in useCallback for stability.

Note

This needs to be tested on an actual device in offline mode to verify the fix across different environments (minified bundles, etc.).

This change adds defensive checks to ensure latestRelease and tag_name are defined before access. Note: This needs to be tested on an actual device in offline mode.
@luqs1 luqs1 mentioned this pull request Jan 29, 2026
5 tasks
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.

1 participant