Permalink
Browse files

Prevent error on empty hash case

  • Loading branch information...
1 parent a920266 commit b7008b04b6a515ccdda7831fcc6dec83cd42c740 @kpdecker committed Apr 15, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 history-handler.js
View
@@ -6,7 +6,7 @@ var HistoryHandler = (function() {
var currentHash, callbackFn;
function loadHash() {
- return decodeURIComponent(/#(.*)$/.exec((location.href || []))[1] || "");
+ return decodeURIComponent((/#(.*)$/.exec(location.href) || [])[1] || "");
}
function checkHistory(){
var hashValue = loadHash();

0 comments on commit b7008b0

Please sign in to comment.