Fix broken markdown rendering

This commit is contained in:
Sebastian Sdorra
2020-08-26 11:21:59 +02:00
parent 54bc6a73eb
commit 3dde62b700
2 changed files with 4 additions and 2 deletions

View File

@@ -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))

View File

@@ -91,10 +91,11 @@ class MarkdownView extends React.Component<Props, State> {
};
}
shouldComponentUpdate(nextProps: Readonly<Props>, nextState: Readonly<State>, nextContext: any): boolean {
shouldComponentUpdate(nextProps: Readonly<Props>, nextState: Readonly<State>): 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() {