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 linearlite loading if issue url is opened directly with no synced issue database #2238

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

alsuren
Copy link

@alsuren alsuren commented Jan 22, 2025

I was trying to debug something unrelated and found that the IssuePage was getting into a bad state if you browsed directly to it in an incognito tab without visiting the main page first.

The fix is reasonably trivial: delay all rendering queries until the initial db dump in synced, like how the rest of the example works.

I also fixed the "not found" rendering. I don't think that useLiveQuery(liveIssue).rows[0] can ever be null: it will always be Item | undefined (typescript types it as Item unless you turn on noUncheckedIndexedAccess).

steps to test

Copy link

netlify bot commented Jan 22, 2025

Deploy Preview for electric-next ready!

Name Link
🔨 Latest commit d23f5e5
🔍 Latest deploy log https://app.netlify.com/sites/electric-next/deploys/6790e1f7e130700008e3ed9a
😎 Deploy Preview https://deploy-preview-2238--electric-next.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

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