Skip to content

Commit 80d7253

Browse files
author
Noah Feldman
committed
ensure getHash return value is consistent with location.hash
1 parent 5dc8775 commit 80d7253

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

build/director.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22

33
//
4-
// Generated on Fri Sep 26 2014 20:08:22 GMT-0400 (EDT) by Nodejitsu, Inc (Using Codesurgeon).
4+
// Generated on Fri Sep 26 2014 20:19:31 GMT-0400 (EDT) by Nodejitsu, Inc (Using Codesurgeon).
55
// Version 1.2.5
66
//
77

@@ -18,7 +18,9 @@
1818
var dloc = document.location;
1919

2020
function getHash() {
21-
return dloc.href.split("#")[1] || '';
21+
var hash = dloc.href.split("#")[1] || '';
22+
if (hash !== '') { hash = '#' + hash }
23+
return hash;
2224
}
2325

2426
function dlocHashEmpty() {

0 commit comments

Comments
 (0)