Allowing parent affiliate URL if channel uses the same URL as network.

This commit is contained in:
DebaucheryLibrarian 2026-01-29 21:51:21 +01:00
parent c536a75f3d
commit 457afa5043
1 changed files with 2 additions and 2 deletions

View File

@ -71,7 +71,7 @@ export function getAffiliateEntityUrl(entity) {
? entity.affiliate.parameters.replaceEntity.url
: entity.affiliate.url;
if (entity.id === entity.affiliate.entityId) {
if (entity.id === entity.affiliate.entityId || entity.url === entity.parent?.url) {
return affiliateUrl;
}
@ -80,7 +80,7 @@ export function getAffiliateEntityUrl(entity) {
}
// channel has its own domain
if (new URL(entity.url).pathname === '/') {
if (new URL(entity.url).pathname === '/' && entity.url !== entity.parent?.url) {
return entity.url;
}