Skip to content

Commit 0de0989

Browse files
committed
refactor: clean-up
1 parent 7fab4ec commit 0de0989

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

js/src/sidebar.js

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -447,8 +447,6 @@ class Sidebar {
447447
const urlHasQueryString = /\?./
448448
const urlHasHash = /#./
449449

450-
console.log(urlHasHash.test(String(window.location)))
451-
452450
if (urlHasParams.test(currentUrl) || urlHasQueryString.test(currentUrl)) {
453451
currentUrl = currentUrl.split('?')[0]
454452
}
@@ -457,18 +455,6 @@ class Sidebar {
457455
currentUrl = currentUrl.split('#')[0]
458456
}
459457

460-
// if (urlHasParams.test(String(window.location)) || urlHasQueryString.test(String(window.location))) {
461-
// currentUrl = String(window.location).split('?')[0]
462-
// } else if (urlHasHash.test(String(window.location))) {
463-
// currentUrl = String(window.location).split('#')[0]
464-
// } else {
465-
// currentUrl = String(window.location)
466-
// }
467-
468-
if (currentUrl.slice(-1) === '#') {
469-
currentUrl = currentUrl.slice(0, -1)
470-
}
471-
472458
const dataAttributes = element.closest(SELECTOR_NAVIGATION_CONTAINER).dataset
473459

474460
if (typeof dataAttributes.activeLinksExact !== 'undefined') {

0 commit comments

Comments
 (0)