diff --git a/scm-ui/ui-components/src/__snapshots__/storyshots.test.ts.snap b/scm-ui/ui-components/src/__snapshots__/storyshots.test.ts.snap index e1e29e4537..f1a2e7fce8 100644 --- a/scm-ui/ui-components/src/__snapshots__/storyshots.test.ts.snap +++ b/scm-ui/ui-components/src/__snapshots__/storyshots.test.ts.snap @@ -38383,7 +38383,7 @@ exports[`Storyshots Diff WithLinkToFile 1`] = ` ; }) - .add("WithLinkToFile", () => ); + .add("WithLinkToFile", () => ( + + )); diff --git a/scm-ui/ui-components/src/repos/Diff.tsx b/scm-ui/ui-components/src/repos/Diff.tsx index 46913c6f4f..f666174476 100644 --- a/scm-ui/ui-components/src/repos/Diff.tsx +++ b/scm-ui/ui-components/src/repos/Diff.tsx @@ -31,6 +31,7 @@ type Props = WithTranslation & DiffObjectProps & { diff: File[]; changesetId?: string; + baseUrl?: string; }; class Diff extends React.Component { diff --git a/scm-ui/ui-components/src/repos/DiffFile.tsx b/scm-ui/ui-components/src/repos/DiffFile.tsx index 261f200f2b..457541d5e9 100644 --- a/scm-ui/ui-components/src/repos/DiffFile.tsx +++ b/scm-ui/ui-components/src/repos/DiffFile.tsx @@ -417,13 +417,14 @@ class DiffFile extends React.Component { } const collapseIcon = this.hasContent(file) ? : null; const fileControls = fileControlFactory ? fileControlFactory(file, this.setCollapse) : null; - const jumpToFile = changesetId ? ( - - ) : null; + const jumpToFile = + changesetId && baseUrl ? ( + + ) : null; const sideBySideToggle = file.hunks && file.hunks.length > 0 ? (