We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8f4ce64 commit 2ce7721Copy full SHA for 2ce7721
dotcom-rendering/src/components/InteractiveBlockComponent.importable.tsx
@@ -385,6 +385,14 @@ export const InteractiveBlockComponent = ({
385
if (graphicUrl.search.length) {
386
graphicUrl.search += '&dark=false';
387
} else {
388
+ // Embed URLs without a trailing slash are redirected and the
389
+ // search param is lost so we need to add it to the pathname
390
+ const hasTrailingSlash = graphicUrl.pathname.endsWith(
391
+ '/',
392
+ )
393
+ ? true
394
+ : false;
395
+ graphicUrl.pathname += hasTrailingSlash ? '' : '/';
396
graphicUrl.search += '?dark=false';
397
}
398
0 commit comments