Cleanup hash routing

This commit is contained in:
djmaze 2020-09-23 14:44:46 +02:00
parent 939eb0fd78
commit 3757324e32
7 changed files with 8 additions and 52 deletions

View file

@ -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]