-
Notifications
You must be signed in to change notification settings - Fork 152
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: Clear react caches when stream is errored #1898
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
|
||
streamCache.set(shapeHash, newShapeStream) | ||
const newShapeStream = new ShapeStream<T>(options) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps move this logic inside the if error clause?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same logic applies if there is no prior shape stream, which is why I left them outside.
- Shape stream exists
- Errored or aborted -> delete cached and create new
- Working fine -> return cached
- Shape stream does not exist
- create new
|
||
shapeCache.set(shapeStream, newShape) | ||
const newShape = new Shape<T>(shapeStream) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
✅ Deploy Preview for electric-next ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Fixes #1690