fixed URL being undefined :face_palm:
This commit is contained in:
parent
3e789057d2
commit
00fa900fc1
|
@ -58,8 +58,8 @@ export function removeParams(params) {
|
|||
return url.href;
|
||||
}
|
||||
|
||||
export function getLocationHash(url) {
|
||||
const hashIndex = window.location.href.indexOf('#');
|
||||
export function getLocationHash(url = window.location.href) {
|
||||
const hashIndex = url.indexOf('#');
|
||||
|
||||
return hashIndex === -1 ? null : url.substring(hashIndex + 1);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue