-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot conditionally render nodes under root template #254
Labels
C-bug
Category: bug, something isn't working
Comments
I can replicate this in the Gitpod starter repo, and I'm getting this error above
|
This seems to be the problematic code. // Sanity check: make sure all nodes in a are children of parent.
#[cfg(debug_assertions)]
{
for (i, node) in a.iter().enumerate() {
if node.parent_node().as_ref() != Some(parent) {
panic!(
"node {} in existing nodes Vec is not a child of parent. node = {:#?}",
i, node
);
}
}
} |
I'm not familiar with this part of the code, so I'll defer to @lukechu10. |
Should be fixed by #251 |
Fixed in v0.6.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Not exactly sure how to word the title, some triage would be appreciated!
Currently, if performing an if/else statement in the root of a template! invocation, an unhandled exception occurs.
To Reproduce
Steps to reproduce the behavior:
use the following code:
Expected behavior
I expect the
<h1>
tag to be removed from the DOM without panicking nor needing a dummy wrapper node.Environment
Additional context
The generated error is the following:
Also note that the error can be avoided by wrapping the if/else expression in a dummy
<span>
or<div>
The text was updated successfully, but these errors were encountered: