Closed jmesserly closed 11 years ago
Turns out we don't remove the bindings. This bug sneaked in when we ported the C++ version over. The C++ version worked (in most cases) because if the ref counting reached zero when the instance was removed and the bindings got removed for free.
Fixed in 8bc1e3466aeb6930150c0d3148f0e830184bf599
@sigmundch and I had a bug in web-ui where we were evaluating bindings in the body conditional binding, even after the condition was changed to false. I think I created the same problem in MDV by tweaking the conditional_display_using_undefined.html example.
You should be able to reproduce with the code below.
If you click the "Click me!" button, it looks like MDV tried to evaluate the expression even though the instantiate= is no longer valid. The output I got was:
In this case evaluating "martianAge" with a bad year is harmless, but it seems like this could cause the application to end up in an invalid state.
Here's the code: