Commit 00fa900f authored by Phil Hughes's avatar Phil Hughes

fixed URL being undefined 🤦

parent 3e789057
......@@ -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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment