Compare commits
2 Commits
e409f3c214
...
217decee06
| Author | SHA1 | Date | |
|---|---|---|---|
| 217decee06 | |||
| d93baf80ab |
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"name": "traxxx-web",
|
||||
"version": "0.46.1",
|
||||
"version": "0.46.2",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"version": "0.46.1",
|
||||
"version": "0.46.2",
|
||||
"dependencies": {
|
||||
"@brillout/json-serializer": "^0.5.8",
|
||||
"@dicebear/collection": "^7.0.5",
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
"overrides": {
|
||||
"vite": "$vite"
|
||||
},
|
||||
"version": "0.46.1",
|
||||
"version": "0.46.2",
|
||||
"imports": {
|
||||
"#/*": "./*.js"
|
||||
}
|
||||
|
||||
@@ -101,7 +101,15 @@ export function getAffiliateEntityUrl(entity, affiliate) {
|
||||
return entityUrl;
|
||||
}
|
||||
|
||||
if (entityAffiliate.parameters?.query) { // used by e.g. Bang
|
||||
const affiliateUrl = entityAffiliate.parameters?.replaceEntity?.hostname === new URL(entityUrl).hostname
|
||||
? entityAffiliate.parameters.replaceEntity.url
|
||||
: entityAffiliate.url;
|
||||
|
||||
if (affiliateUrl && (entity.id === entityAffiliate.entityId || entityUrl === entity.parent?.url)) {
|
||||
return affiliateUrl;
|
||||
}
|
||||
|
||||
if (entityAffiliate.parameters?.query) {
|
||||
const newParams = new URLSearchParams({
|
||||
...Object.fromEntries(new URL(entityUrl).searchParams),
|
||||
...Object.fromEntries(new URLSearchParams(entityAffiliate.parameters.query)),
|
||||
@@ -110,14 +118,6 @@ export function getAffiliateEntityUrl(entity, affiliate) {
|
||||
return `${entityUrl}?${newParams.toString()}`;
|
||||
}
|
||||
|
||||
const affiliateUrl = entityAffiliate.parameters?.replaceEntity?.hostname === new URL(entityUrl).hostname
|
||||
? entityAffiliate.parameters.replaceEntity.url
|
||||
: entityAffiliate.url;
|
||||
|
||||
if (entity.id === entityAffiliate.entityId || entityUrl === entity.parent?.url) {
|
||||
return affiliateUrl;
|
||||
}
|
||||
|
||||
if (entity.type === 'network' || entity.isIndependent) {
|
||||
return entityUrl;
|
||||
}
|
||||
|
||||
2
static
2
static
Submodule static updated: ea8019c555...8f331b46e7
Reference in New Issue
Block a user