Skip to content

Commit 2e1999f

Browse files
Potential fix for code scanning alert no. 2: Incomplete multi-character sanitization
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent ec6af96 commit 2e1999f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

websites/app/src/pages/Activity/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ const Activity: React.FC = () => {
266266
],
267267
[isLoading, ongoingSubmissions, pastSubmissions]
268268
);
269-
const basePath = useMemo(() => location.pathname.replace(/\/(ongoing|past).*/, ""), [location.pathname]);
269+
const basePath = useMemo(() => location.pathname.split(/\/(ongoing|past)\b/)[0], [location.pathname]);
270270
const switchTab = (n: number) => {
271271
setCurrentTab(n);
272272
const params = new URLSearchParams(location.search);

0 commit comments

Comments
 (0)