Maintain separation between terminate and handleEvent phases; fixes bug.
This commit is contained in:
parent
b559ab04f8
commit
6160012576
|
@ -61,10 +61,6 @@ function todoListItemView(id) {
|
|||
this.editing = false;
|
||||
react {
|
||||
during todo(id, $title, $completed) {
|
||||
// BUG: terminate() kills off the during show subfacet
|
||||
// entirely?!?! Yes, it should kill "its" children - but which
|
||||
// are its children? We need some way of distinguishing by
|
||||
// instantiation.
|
||||
during show(completed) {
|
||||
assert this.ui.html('.todo-list',
|
||||
Mustache.render(getTemplate(this.editing
|
||||
|
|
|
@ -149,7 +149,6 @@ Facet.prototype.onEvent = function(isTerminal, eventType, subscriptionFn, projec
|
|||
: e.patch.removed,
|
||||
spec);
|
||||
if (objects && objects.size > 0) {
|
||||
facet.actor.pushAction(function () {
|
||||
var shouldTerminate = isTerminal;
|
||||
objects.forEach(function (o) {
|
||||
var instantiated = Trie.instantiateProjection(spec, o);
|
||||
|
@ -158,9 +157,10 @@ Facet.prototype.onEvent = function(isTerminal, eventType, subscriptionFn, projec
|
|||
shouldTerminate = false;
|
||||
facet.terminate();
|
||||
}
|
||||
facet.actor.pushAction(function () {
|
||||
Util.kwApply(handlerFn, facet.actor.state, o);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue