Skip to content

Commit feadd10

Browse files
Issue 33119 bad copy url (#33142)
Updated code to remove extra slash This PR fixes: #33119
1 parent 23952c4 commit feadd10

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

core-web/libs/portlets/dot-experiments/portlet/src/lib/dot-experiments-configuration/components/dot-experiments-configuration-variants/dot-experiments-configuration-variants.component.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,11 @@ export class DotExperimentsConfigurationVariantsComponent {
218218
);
219219
} catch {
220220
// Fallback to relative URL using window.location.origin
221+
const cleanProcessedUrl = processedUrl.startsWith('/')
222+
? processedUrl.substring(1)
223+
: processedUrl;
221224
url = new URL(
222-
`${window.location.origin}/${processedUrl}${
225+
`${window.location.origin}/${cleanProcessedUrl}${
223226
processedUrl.indexOf('?') != -1 ? '&' : '?'
224227
}disabledNavigateMode=true&mode=LIVE`
225228
);

0 commit comments

Comments
 (0)