Permalink
Browse files

prevent the hash assignment handling on an empty hash Fixes #5442

  • Loading branch information...
johnbender committed Jan 15, 2013
1 parent 2e195d2 commit 621a8d914353865d1134c52e7e21d05630bef2d7
Showing with 8 additions and 6 deletions.
  1. +8 −6 js/navigation/navigator.js
View
@@ -3,10 +3,10 @@
//>>label: Navigation Manager
//>>group: Navigation
define(["jquery",
"./../jquery.mobile.ns",
"../events/navigate",
"./path",
"./history" ], function( $ ) {
"./../jquery.mobile.ns",
"../events/navigate",
"./path",
"./history" ], function( $ ) {
//>>excludeEnd("jqmBuildExclude");
(function( $, undefined ) {
var path = $.mobile.path;
@@ -198,8 +198,10 @@ define(["jquery",
// matches an existing history entry
// TODO it might be better to only add to the history stack
// when the hash is adjacent to the active history entry
if( !event.originalEvent.state ) {
hash = path.parseLocation().hash;
hash = path.parseLocation().hash;
if( !event.originalEvent.state && hash ) {
// squash the hash that's been assigned on the URL with replaceState
// also grab the resulting state object for storage
state = this.squash( hash );
// record the new hash as an additional history entry

0 comments on commit 621a8d9

Please sign in to comment.