From cfbaf63b5c8d9b563b7b4da7242a7c782f0f3d60 Mon Sep 17 00:00:00 2001 From: Konstantin Schaper Date: Wed, 26 Aug 2020 11:34:15 +0200 Subject: [PATCH] add additional precautious check --- scm-ui/ui-components/src/repos/Diff.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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() {