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: loadPuckInitialHistory is never called #32

Merged
merged 1 commit into from
Aug 28, 2024
Merged

Conversation

benlife5
Copy link
Contributor

loadPuckInitialHistory() was called when visualConfigurationData updated, but sometimes it would immediate return because visualConfigurationDataFetched was false, causing the puck history to never load.

Since setVisualConfigurationData() & setVisualConfigurationDataFetched() are called in the same function, this case would sometimes happen.

Switched the useEffect for loadPuckInitialHistory() to watch for saveStateFetched and visualConfigurationDataFetched to avoid this condition.

@benlife5 benlife5 merged commit 2b132b0 into main Aug 28, 2024
9 checks passed
@benlife5 benlife5 deleted the fix-empty-puck-history branch August 28, 2024 17:59
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.

2 participants