chaplinjs/chaplin — pull request #144 by molily (2012-07-13 12:43:28+00:00)
Title: Fix order of route matching

See #126

#132 only changed one part of the routing. Backbone is still matching the routes in `Backbone.history.handlers` from `0..length` when routing initially or after `popState` / hash change.

So we need to `push` Chaplin routes into `Backbone.history.handlers` instead of calling `Backbone.history.route` which `unshift`s the route.

With this change, we can revert the special loop in `Chaplin.Router#route`.

Hope this fixes the issue for good.