jashkenas/backbone — pull request #2791 by abernier (2013-10-04 16:55:45+00:00)
Title: Transition from hash-based route: check it's really a route (and not an ...

...anchor)

## Issue

On `http://mysuperapp.com` (with a pushState-enabled browser) suppose we have a `Go to top`. After having clicked on it, location is now `http://mysuperapp.com/#top`.

When refreshing the page (F5), Backbone history converts it to `http://mysuperapp.com/top` which is wrong because `'top'` is not a route...

## Proposed solution

Just check the fragment `'top'` is **really** a route. This allows usage of anchors in pushState-enabled browsers.