Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Commit

Permalink
prevent the hash assignment handling on an empty hash Fixes #5442
Browse files Browse the repository at this point in the history
  • Loading branch information
johnbender committed Jan 15, 2013
1 parent 2e195d2 commit 621a8d9
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions js/navigation/navigator.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 621a8d9

Please sign in to comment.