diff --git a/scm-ui/ui-components/src/repos/Diff.tsx b/scm-ui/ui-components/src/repos/Diff.tsx index 3fb81571e6..7f11bb6cca 100644 --- a/scm-ui/ui-components/src/repos/Diff.tsx +++ b/scm-ui/ui-components/src/repos/Diff.tsx @@ -74,7 +74,7 @@ class Diff extends React.Component { shouldComponentUpdate(nextProps: Readonly, nextState: Readonly): boolean { // We have check if the contentRef changed and update afterwards so the page can scroll to the anchor links. // Otherwise it can happen that componentDidUpdate is never executed depending on how fast the markdown got rendered - return this.state.contentRef !== nextState.contentRef; + return this.state.contentRef !== nextState.contentRef || this.props !== nextProps; } render() {