Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
first_node
function can fail, like when the VNodeis not mounted, so this adds a safe version that returns an
Option<Node>
and refactors the previous version to use the "unchecked"prefix as it can and should panic if the first node cannot be found.
This change resolves @intendednull's particular issue and there seems to be
a few different versions of panics that occur that all have this function in common
so it might fix them all. I think the issue comes about when trying to insert a
node before a component that is no longer mounted - trying to find that component's
first node fails and causes the panic when we could just ignore it and then render the
node on its own.
Description
Fixes #1946
If this is accepted before it is merged a caveat I have is - I can't accept the reward so
I don't know whether @intendednull can cancel the funded issue or whether
we have to? (not quite sure how it works 🙃)
Checklist
cargo make pr-flow