pushstate() and preventDefault() were not working on default route becau... #528

Merged
merged 1 commit into from Nov 7, 2013

Conversation

Projects
None yet
2 participants
@marshallswain
Member

marshallswain commented Nov 2, 2013

Using hasOwnProperty() to prevent comparison of default route empty string "".

AKA. pushstate() now works for the default route.

Here is a fiddle demonstrating it's previous behavior:
http://jsfiddle.net/marshallswain/RdEax/4/

pushstate() and preventDefault() were not working on default route be…
…cause curParams.route was returning an empty string. Using hasOwnProperty() fixes this.
@imjoshdean

This comment has been minimized.

Show comment
Hide comment
@imjoshdean

imjoshdean Nov 7, 2013

Contributor

Looks good. Merging, thanks!

Contributor

imjoshdean commented Nov 7, 2013

Looks good. Merging, thanks!

imjoshdean added a commit that referenced this pull request Nov 7, 2013

Merge pull request #528 from marshallswain/master
pushstate() and preventDefault() were not working on default route becau...

@imjoshdean imjoshdean merged commit 75d5064 into canjs:master Nov 7, 2013

1 check passed

default The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment