Skip to content

fixes #1003 - History is started before `navigate` #1010

Merged
merged 1 commit into from Feb 15, 2012

2 participants

@braddunbar
Collaborator

If history has not been started before the first call to navigate (changing the iframe hash) the next checkUrl sees the hash as blank. By starting history earlier in start this is avoided.

Also, historyStarted was moved to Backbone.History.started. It is impossible to check it's value otherwise.

The test case is only useful in browsers that need the iframe.

@braddunbar braddunbar fixes #1003 - History is started before `navigate` 232c888
@jashkenas
Owner

Looks almost perfect. But shouldn't that be Backbone.history.started? With the lowercase h

@braddunbar
Collaborator

I don't think so. historyStarted was used for all instances of Backbone.History. It denotes that any instance has been started, not just the current one.

var history = new Backbone.History();
history.start();
Backbone.history.start(); // should throw
@jashkenas
Owner

You're quite right.

@jashkenas jashkenas merged commit 16b37e7 into jashkenas:master Feb 15, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.