diff options
-rw-r--r-- | app/assets/javascripts/lib/utils/url_utility.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/assets/javascripts/lib/utils/url_utility.js b/app/assets/javascripts/lib/utils/url_utility.js index 2129a7298d5..f1ee9c8f2e5 100644 --- a/app/assets/javascripts/lib/utils/url_utility.js +++ b/app/assets/javascripts/lib/utils/url_utility.js @@ -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); } |