Skip to content

Commit db066dc

Browse files
Copilotpetesramek
andauthored
fix: version switcher navigates to PolylineAlgorithm.html instead of bare version folder
Agent-Logs-Url: https://github.com/petesramek/polyline-algorithm-csharp/sessions/151b30cf-9f56-4b14-80a6-01a5e67ea6b1 Co-authored-by: petesramek <2333452+petesramek@users.noreply.github.com>
1 parent ceb6349 commit db066dc

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

api-reference/docs-versioning/public/version-switcher.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@
5353
'/' + targetVersion + '/'
5454
);
5555
} else {
56-
newPathname = window.location.pathname.replace(/\/$/, '') + '/' + targetVersion + '/';
56+
var siteRootPath = new URL(getSiteRoot(), window.location.href).pathname.replace(/\/$/, '');
57+
newPathname = siteRootPath + '/' + targetVersion + '/PolylineAlgorithm.html';
5758
}
5859

5960
window.location.pathname = newPathname;

0 commit comments

Comments
 (0)