Skip to content

Commit

Permalink
fix newURL
Browse files Browse the repository at this point in the history
  • Loading branch information
podefr committed Sep 3, 2013
1 parent 1c414aa commit 77966f4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion specs/LocationRouter.spec.js
Expand Up @@ -76,7 +76,7 @@ require(["LocationRouter", "Router"], function (LocationRouter, Router) {
spyOn(locationRouter, "parse").andReturn(array); spyOn(locationRouter, "parse").andReturn(array);
spyOn(locationRouter, "navigate"); spyOn(locationRouter, "navigate");


locationRouter.onHashChange({ newUrl: "url#hello/im/the/router"}); locationRouter.onHashChange({ newURL: "url#hello/im/the/router"});


expect(locationRouter.parse).toHaveBeenCalledWith("hello/im/the/router"); expect(locationRouter.parse).toHaveBeenCalledWith("hello/im/the/router");
expect(locationRouter.navigate).toHaveBeenCalledWith("hello", "im", "the", "router"); expect(locationRouter.navigate).toHaveBeenCalledWith("hello", "im", "the", "router");
Expand Down
2 changes: 1 addition & 1 deletion src/LocationRouter.js
Expand Up @@ -80,7 +80,7 @@ function LocationRouter(Router, Tools) {
* @private * @private
*/ */
this.onHashChange = function onHashChange(event) { this.onHashChange = function onHashChange(event) {
var parsedHash = this.parse(event.newUrl.split("#").pop()); var parsedHash = this.parse(event.newURL.split("#").pop());
this.navigate.apply(this, parsedHash); this.navigate.apply(this, parsedHash);
}; };


Expand Down

0 comments on commit 77966f4

Please sign in to comment.