Skip to content

Conversation

@thomashoneyman
Copy link
Member

Fixes #675. I noticed while writing up the issue that a call to dispose will use the driver state it received when the component was first run, and will attempt to dispose the rendered tree at that time. Instead, we need to use the latest driver state when disposing.

This PR reads the latest driver state and works correctly in my test case in #675.

Copy link
Member

@garyb garyb left a comment

Choose a reason for hiding this comment

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

Subtle!

@thomashoneyman thomashoneyman merged commit 3ee1bb2 into purescript-halogen:master Jun 18, 2020
@thomashoneyman thomashoneyman deleted the dispose-fix branch June 18, 2020 21:59
milesfrain pushed a commit to milesfrain/purescript-halogen that referenced this pull request Jun 28, 2020
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.

Disposal fails if component root element changes

3 participants