Skip to content

Commit 51122c8

Browse files
authored
Fix thisPage
1 parent 15d1d37 commit 51122c8

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

js/script.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3481,7 +3481,8 @@ Options -Indexes
34813481

34823482
const thisPage = function() {
34833483
const url = globalThis.location.href;
3484-
return url.split('/')[3].split(".html")[0];
3484+
const parts = url.split('/');
3485+
return parts[parts.length - 1].split(".html")[0];
34853486
}
34863487

34873488
const loadTemplates = function(){

0 commit comments

Comments
 (0)