Compare commits

...

2 Commits

Author SHA1 Message Date
490be8800a 0.45.8 2026-01-30 23:20:23 +01:00
49ee6b4eee Fixed unresolved affiliate scene URL breaking. 2026-01-30 23:20:21 +01:00
3 changed files with 12 additions and 8 deletions

4
package-lock.json generated
View File

@@ -1,11 +1,11 @@
{ {
"name": "traxxx-web", "name": "traxxx-web",
"version": "0.45.7", "version": "0.45.8",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"version": "0.45.7", "version": "0.45.8",
"dependencies": { "dependencies": {
"@brillout/json-serializer": "^0.5.8", "@brillout/json-serializer": "^0.5.8",
"@dicebear/collection": "^7.0.5", "@dicebear/collection": "^7.0.5",

View File

@@ -89,7 +89,7 @@
"overrides": { "overrides": {
"vite": "$vite" "vite": "$vite"
}, },
"version": "0.45.7", "version": "0.45.8",
"imports": { "imports": {
"#/*": "./*.js" "#/*": "./*.js"
} }

View File

@@ -31,10 +31,6 @@ export function getAffiliateSceneUrl(scene) {
return watchUrl; return watchUrl;
} }
const affiliateUrl = scene.affiliate.parameters.replaceScene?.hostname === new URL(watchUrl).hostname
? scene.affiliate.parameters.replaceScene.url
: scene.affiliate.url;
if (scene.affiliate.parameters.dynamicScene) { if (scene.affiliate.parameters.dynamicScene) {
const scenePath = new URL(watchUrl).pathname; const scenePath = new URL(watchUrl).pathname;
@@ -46,8 +42,16 @@ export function getAffiliateSceneUrl(scene) {
}); });
} }
const affiliateUrl = scene.affiliate.parameters.replaceScene?.hostname === new URL(watchUrl).hostname
? scene.affiliate.parameters.replaceScene.url
: scene.affiliate.url;
if (!affiliateUrl) {
return watchUrl;
}
// NATS deep URL // NATS deep URL
if (affiliateUrl?.includes('/track') if (affiliateUrl.includes('/track')
&& scene.affiliate.parameters.scene !== false && scene.affiliate.parameters.scene !== false
&& (!scene.channel.isIndependent || scene.channel.id === scene.affiliate.entityId)) { && (!scene.channel.isIndependent || scene.channel.id === scene.affiliate.entityId)) {
const { pathname, search } = new URL(watchUrl); const { pathname, search } = new URL(watchUrl);