blakeembrey / dombars

*DEPRECATED* DOM-based templating library with data-binding and built on Handlebars
MIT License
51 stars 5 forks source link

Subscription trigger order #28

Closed blakeembrey closed 10 years ago

blakeembrey commented 10 years ago

At the moment, subscriptions are triggered in the order that they are listening. This actually causes a subtle bug when a child runs before the parent, especially if they are listening to the same event. For example:

{{#if test}}
  {{helper test}}
{{/if}}

When test changes the helper could run with an empty/invalid test value. Then the parent listener runs and the dom area is discarded anyway.