Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes #1003 - History is started before navigate #1010

Merged
merged 1 commit into from Feb 15, 2012
Merged

fixes #1003 - History is started before navigate #1010

merged 1 commit into from Feb 15, 2012

Conversation

braddunbar
Copy link
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.

@jashkenas
Copy link
Owner

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

@braddunbar
Copy link
Collaborator Author

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
Copy link
Owner

You're quite right.

jashkenas added a commit that referenced this pull request Feb 15, 2012
fixes #1003 - History is started before `navigate`
@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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants