From 5a712f0fef2f3f1af0ab66c8b09e8d7ab4a2d6b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9A=8F=E9=A3=8E?= Date: Thu, 29 Jul 2021 13:55:04 +0800 Subject: [PATCH] Fix: loop refresh when pathname is /- (#780) * docs: update README * docs: fix format * fix: auto format content by prettier * chore: add changeLog section in pr template * chore: remove duplicate pr template section * fix: circular jump when location is /- --- shell/app/org-home/stores/org.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell/app/org-home/stores/org.tsx b/shell/app/org-home/stores/org.tsx index bbb06d55f0..09aa84dd86 100644 --- a/shell/app/org-home/stores/org.tsx +++ b/shell/app/org-home/stores/org.tsx @@ -103,7 +103,7 @@ const org = createStore({ } } if (currentOrg.name !== orgName) { - location.href = location.href.replace(`/${orgName}/`, `/${currentOrg.name}/`); + location.href = location.href.replace(`/${orgName}`, `/${currentOrg.name}`); // just replace the first match, which is org name return; } if (orgId) {