Skip to content

Commit d1d9de8

Browse files
Merge pull request #15180 from guardian/jsh/add-standard-button
[StandardLinkElementButton]: Correct display logic for external links
2 parents a33ebcc + 2ef14aa commit d1d9de8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • dotcom-rendering/src/components/Button

dotcom-rendering/src/components/Button/utils.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const platformHostnames = [
99
];
1010

1111
export const isExternalLink = (url: string) =>
12-
platformHostnames.includes(new URL(url).hostname);
12+
!platformHostnames.includes(new URL(url).hostname);
1313

1414
export const getPropsForLinkUrl = (label: string) => ({
1515
rel: 'noreferrer noopener',

0 commit comments

Comments
 (0)