diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c25740da4..17064befab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased ### Fixed +- Fix broken markdown rendering ([#1303](https://github.com/scm-manager/scm-manager/pull/1303)) - JWT token timeout is now handled properly ([#1297](https://github.com/scm-manager/scm-manager/pull/1297)) - Fix text-overflow in danger zone ([#1298](https://github.com/scm-manager/scm-manager/pull/1298)) - Fix plugin installation error if previously a plugin was installed with the same dependency which is still pending. ([#1300](https://github.com/scm-manager/scm-manager/pull/1300)) diff --git a/scm-ui/ui-components/src/MarkdownView.tsx b/scm-ui/ui-components/src/MarkdownView.tsx index 164d49abaf..048905edd4 100644 --- a/scm-ui/ui-components/src/MarkdownView.tsx +++ b/scm-ui/ui-components/src/MarkdownView.tsx @@ -91,10 +91,11 @@ class MarkdownView extends React.Component { }; } - shouldComponentUpdate(nextProps: Readonly, nextState: Readonly, nextContext: any): boolean { + 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; + // We also have to check if props have changed, because we also want to rerender if one of our props has changed + return this.state.contentRef !== nextState.contentRef || this.props !== nextProps; } componentDidUpdate() {