bitovi/canjs — pull request #473 by ccummings (2013-09-11 15:17:44+00:00)
Title: can.route.ready called multiple times

`can.route.ready` is being called twice (or more if the user calls it themselves) which calls `setState` and binds to the `hashChange` event each time.

`can.route.ready` is the handler for the `ready` event ([L503](https://github.com/bitovi/canjs/blob/master/route/route.js#L503)) and is then called on [L508](https://github.com/bitovi/canjs/blob/master/route/route.js#L508). This results in 2 bindings to the `hashChange` event (more if user calls `can.route.ready` themselves).

The other issue is that any modifications to the route before the `ready` event are wiped out by one of the other `setState` calls.

I've added a flag that only allows ready to be called once.