duh, don't include query string params in referral check

This commit is contained in:
hobbes7878 2024-11-28 14:11:00 +00:00
parent fb51999b1e
commit 4f87c68e82

View file

@ -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) => {