Skip to content

Commit

Permalink
Merge pull request #1184 from data-for-change/bug-1171-fix-change-lan…
Browse files Browse the repository at this point in the history
…guage-button

[BUG-1171] Fix bug in newsId fetch when different language url
  • Loading branch information
atalyaalon authored Feb 19, 2025
2 parents 4f76f40 + b3782bb commit 871b5f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/url.utils.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export const getNewsIdFromUrl = () => {
const pathname = window.location.pathname;
const [, , newsId] = pathname.split('/');
const newsId = pathname.split('/')[-1];

return newsId ? { newsFlashId: +newsId } : { pageNumber: 1 };
};

0 comments on commit 871b5f5

Please sign in to comment.