mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-08 17:07:03 +03:00
Cleanup hash routing
This commit is contained in:
parent
939eb0fd78
commit
3757324e32
7 changed files with 8 additions and 52 deletions
6
vendors/routes/hasher.js
vendored
6
vendors/routes/hasher.js
vendored
|
|
@ -28,11 +28,7 @@
|
|||
// Private Methods
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
const _trimHash = hash => {
|
||||
if(! hash) return '';
|
||||
var regexp = new RegExp('^\\/|\\$', 'g');
|
||||
return hash.replace(regexp, '');
|
||||
},
|
||||
const _trimHash = hash => hash ? hash.replace(new RegExp('^\\/|\\$', 'g'), '') : '',
|
||||
_getWindowHash = () => {
|
||||
//parsed full URL instead of getting window.location.hash because Firefox decode hash value (and all the other browsers don't)
|
||||
//also because of IE8 bug with hash query in local file [issue #6]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue