Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Read most recent driver state when disposing#676

Merged
thomashoneyman merged 1 commit intopurescript-halogen:masterpurescript-halogen/purescript-halogen:masterfrom
thomashoneyman:dispose-fixCopy head branch name to clipboard
Jun 18, 2020
Merged

Read most recent driver state when disposing#676
thomashoneyman merged 1 commit intopurescript-halogen:masterpurescript-halogen/purescript-halogen:masterfrom
thomashoneyman:dispose-fixCopy head branch name to clipboard

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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.