Skip to content

Commit eceebae

Browse files
committed
yeah so substring doesn't modify in place
1 parent 5130c0e commit eceebae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/assets/javascripts/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ document.querySelectorAll("a").forEach((a) =>
55
let currentPath = document.location.href;
66
// Paths end with slashes in prod but not locally
77
if (currentPath.endsWith("/")) {
8-
currentPath.substring(0, currentPath.length - 1);
8+
currentPath = currentPath.substring(0, currentPath.length - 1);
99
}
1010
// Check if it points to the same page we're on
1111
if (href.includes("#") && href.startsWith(currentPath)) {

0 commit comments

Comments
 (0)