Skip to content

Commit 5a28d74

Browse files
authored
Segment switch 3.0 (#1322)
* add redirect by path for segment switch * remove ?ent from redirect * removed window relatance from functions * removed comment * fix reason why redirect didnt work in production
1 parent 094c527 commit 5a28d74

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

_includes/scripts.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,8 @@
147147

148148
const redirectMap = await fetchRedirectMap();
149149

150-
const currentPath = window.location.pathname;
150+
const pathname = window.location.pathname;
151+
const currentPath = pathname.replace(SITE_BASE_URL, "");
151152

152153
if (selectedValue === 'enterprise') {
153154
localStorage.setItem(enterpriseDocTypeLockKey, 'true');

0 commit comments

Comments
 (0)