diff --git a/src/components/ReferralBlock/filterCurrentPage.ts b/src/components/ReferralBlock/filterCurrentPage.ts index 03de0e24..25365555 100644 --- a/src/components/ReferralBlock/filterCurrentPage.ts +++ b/src/components/ReferralBlock/filterCurrentPage.ts @@ -20,7 +20,10 @@ const isCurrentPage = (urlPath: string) => { } const url = getUrlFromPath(urlPath); if (!url) return false; - return window.location.href === url.href; + return ( + window.location.origin === url.origin && + window.location.pathname === url.pathname + ); }; export const articleIsNotCurrentPage = (article: Article) => {