mirror of
https://github.com/jashkenas/backbone.git
synced 2026-04-30 03:00:06 -04:00
Fix #1649 - Set location.hash with a leading #.
This commit is contained in:
@@ -1160,7 +1160,8 @@
|
||||
if (replace) {
|
||||
location.replace(location.href.replace(/(javascript:|#).*$/, '') + '#' + fragment);
|
||||
} else {
|
||||
location.hash = fragment;
|
||||
// #1649 - Some browsers require that `hash` contains a leading #.
|
||||
location.hash = '#' + fragment;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user