Skip to content

Conversation

@marc2332
Copy link
Owner

Closes #602

@codecov
Copy link

codecov bot commented Jun 27, 2024

Codecov Report

Attention: Patch coverage is 90.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 73.76%. Comparing base (03cb4dc) to head (957d1f1).
Report is 1 commits behind head on main.

Current head 957d1f1 differs from pull request most recent head 4e54c6d

Please upload reports for the commit 4e54c6d to get more accurate results.

Files Patch % Lines
crates/core/src/dom/mutations_writer.rs 90.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #744   +/-   ##
=======================================
  Coverage   73.76%   73.76%           
=======================================
  Files         198      198           
  Lines       20352    20362   +10     
=======================================
+ Hits        15012    15021    +9     
- Misses       5340     5341    +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

// this is mainly due to nodes being created in the same run as when this function (remove) is being called,
// like nodes created by loaded templates.
// In this case we can safely skip these nodes.
if !does_node_have_state {
Copy link
Contributor

@ZeroX-DG ZeroX-DG Jun 27, 2024

Choose a reason for hiding this comment

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

Nitpicking: Maybe just call the variable node_state_is_empty = layer_state.is_none() so we don't have to think about the ! 😄 .

@ZeroX-DG
Copy link
Contributor

ZeroX-DG commented Jun 27, 2024

Looks nice. I'll give it a quick test when I'm free.

@ZeroX-DG
Copy link
Contributor

Works great for me!

Copy link
Contributor

@ZeroX-DG ZeroX-DG left a comment

Choose a reason for hiding this comment

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

LGTM 🎉

@marc2332 marc2332 merged commit 67d3144 into main Jun 29, 2024
@marc2332 marc2332 deleted the fix/skip-dom-nodes-loaded-in-the-same-mutations-run branch June 29, 2024 07:59
This was referenced Jun 29, 2024
This was referenced Jul 6, 2024
This was referenced Jul 16, 2024
@github-actions github-actions bot mentioned this pull request Aug 3, 2024
@github-actions github-actions bot mentioned this pull request Aug 10, 2024
This was referenced Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix 🩹 Fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: Replaced elements from loaded from a batch in the same frame leads to a crash

3 participants