Skip to content

Fix stale DOM with async preact-router#1539

Merged
marvinhagemeister merged 2 commits into
masterfrom
fix_async_router
Apr 14, 2019
Merged

Fix stale DOM with async preact-router#1539
marvinhagemeister merged 2 commits into
masterfrom
fix_async_router

Conversation

@marvinhagemeister

@marvinhagemeister marvinhagemeister commented Apr 14, 2019

Copy link
Copy Markdown
Member

This PR fixes an issue that is most noticeable with the Async component in our cli. The issue is that the previous page is not unmounted correctly when switching routes. When this happens the vnode's _dom property is wrong. The changes fix this problem, but I still haven't found a way to turn it into a decent test case.

Adds +1 B 🎉

EDIT: Found a test case that reproduces the exact issue 🎉

@JoviDeCroock JoviDeCroock left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Small changes with lots of benefit, is there something you can't love about PR's like these? :D Great job yet again. You're on 🔥

@marvinhagemeister marvinhagemeister marked this pull request as ready for review April 14, 2019 09:14
@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage remained the same at 98.223% when pulling 3914769 on fix_async_router into f7c7f2f on master.

@marvinhagemeister marvinhagemeister merged commit 1cddbec into master Apr 14, 2019
@marvinhagemeister marvinhagemeister deleted the fix_async_router branch April 14, 2019 09:25
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.

3 participants