Permalink
Browse files

add comments

  • Loading branch information...
1 parent 85b47cc commit a14ab54a235f7e5197686c6a1b5e649d7ebe52a2 @mikaelkaron mikaelkaron committed Apr 19, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/route/router.js
View
4 src/route/router.js
@@ -16,11 +16,15 @@ define([ "compose", "../component/widget", "../util/uri" ], function RouteRouter
// Create URI
uri = URI($event.target.location.hash.replace(/^#/, ""));
+ // Convert to string
newUri = uri.toString();
+ // Did anything change?
if (newUri !== oldUri) {
+ // Store new value
oldUri = newUri;
+ // Publish route
self.publish("route", uri);
}
}

0 comments on commit a14ab54

Please sign in to comment.