Permalink
Browse files

fix newURL

  • Loading branch information...
1 parent 1c414aa commit 77966f46ab9d81f9027cc4b55f7a308fe4ece882 @podefr podefr committed Sep 3, 2013
Showing with 2 additions and 2 deletions.
  1. +1 −1 specs/LocationRouter.spec.js
  2. +1 −1 src/LocationRouter.js
View
2 specs/LocationRouter.spec.js
@@ -76,7 +76,7 @@ require(["LocationRouter", "Router"], function (LocationRouter, Router) {
spyOn(locationRouter, "parse").andReturn(array);
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.navigate).toHaveBeenCalledWith("hello", "im", "the", "router");
View
2 src/LocationRouter.js
@@ -80,7 +80,7 @@ function LocationRouter(Router, Tools) {
* @private
*/
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);
};

0 comments on commit 77966f4

Please sign in to comment.