summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-12-07 14:30:00 +0000
committerPhil Hughes <me@iamphill.com>2017-12-08 08:54:51 +0000
commit00fa900fc1b10e920be3ef9bb17807667b710ccd (patch)
tree0ee0ae21ff12c90c4d9bca51fcbee32ddbc10fbc
parent3e789057d2955009d6a50444fe7e764ce995986a (diff)
downloadgitlab-ce-00fa900fc1b10e920be3ef9bb17807667b710ccd.tar.gz
fixed URL being undefined :face_palm:
-rw-r--r--app/assets/javascripts/lib/utils/url_utility.js4
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);
}