Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Virtual elements disappear after tag update #1659
There are several things wrong here, currently if and each do not work on virtual, this is fixed in the
With nested In this example the issue exists, if you comment out the "Real" section the example works, or if you move the "nested" section before the real.it works also.
Also a side note, it seems the inheritance has changed in
I've got a fix for this. There was a bug with how riot handled
@believer-ufa there were also some bugs in your original example:
Putting it all together, try out this plunk and tell me if it behaves as expected.
#1659 brought up an issue where you'd have both `each` and `if` on a custom tag. In that case, the each code would actually create an instance of the tag, even when the `if` expressions was false. To get around this, we just have `each` also evaluate the `if` and skip items where it's false. That might sound like mixing concerns a bit too much, but I actually think the resulting code is easier to read. It's also probably faster, since we avoid creating and parsing DOM in the false case.