Fix bug: no need to propagate routing changes back down again
This commit is contained in:
parent
e79b0092ed
commit
55a4f0c615
18
index.js
18
index.js
|
@ -60,6 +60,24 @@ var g = new Ground(function () {
|
|||
sub(__, 1)]);
|
||||
World.send({msg: 'hello outer world'}, 1);
|
||||
World.send({msg: 'hello inner world'}, 0);
|
||||
// World.spawn(new World(function () {
|
||||
// World.spawn({
|
||||
// boot: function () {
|
||||
// console.log('w1p1');
|
||||
// World.updateRoutes([sub('w1p1')]);
|
||||
// },
|
||||
// handleEvent: function (e) { console.log('w1p1', e); }
|
||||
// })
|
||||
// }))
|
||||
// World.spawn(new World(function () {
|
||||
// World.spawn({
|
||||
// boot: function () {
|
||||
// console.log('w2p2');
|
||||
// World.updateRoutes([sub('w2p2')]);
|
||||
// },
|
||||
// handleEvent: function (e) { console.log('w2p2', e); }
|
||||
// })
|
||||
// }));
|
||||
},
|
||||
handleEvent: function (e) {
|
||||
if (e.type === "send" && e.message[0] === "jQuery") {
|
||||
|
|
|
@ -391,7 +391,7 @@ World.prototype.handleEvent = function (e) {
|
|||
switch (e.type) {
|
||||
case "routes":
|
||||
this.downwardRoutes = liftRoutes(e.routes);
|
||||
this.issueRoutingUpdate();
|
||||
this.eventQueue.push(updateRoutes(this.aggregateRoutes(this.downwardRoutes)));
|
||||
break;
|
||||
case "send":
|
||||
this.eventQueue.push(sendMessage(e.message, e.metaLevel + 1, e.isFeedback));
|
||||
|
|
Loading…
Reference in New Issue