urbit / tree

The web interface for your urbit.
13 stars 7 forks source link

Prevent dispatching in the middle of a dispatch #15

Closed knubie closed 8 years ago

knubie commented 8 years ago

Previously unmounting an urbit app module from within tree by, for example, hitting the back button, would cause a dispatch to be emitted durring another dispatch, which would throw an exception.

The official method for handling this is to use the dispatchToken.waitFor method. However that requires referencing a specific dispatchToken to wait for, which was causing circular dependencies. So the setTimeout method, works, albeit a bit hacky.

issue #14