mirror of
https://github.com/SchildiChat/element-web.git
synced 2024-10-01 01:26:12 -04:00
add comments
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
9d1a3c9011
commit
22b7298542
@ -30,10 +30,14 @@ export default class SyntaxHighlight extends React.Component {
|
||||
this._ref = this._ref.bind(this);
|
||||
}
|
||||
|
||||
// componentDidUpdate used here for reusability
|
||||
// componentWillReceiveProps fires too early to call highlightBlock on.
|
||||
componentDidUpdate() {
|
||||
if (this._el) highlightBlock(this._el);
|
||||
}
|
||||
|
||||
// call componentDidUpdate because _ref is fired on initial render
|
||||
// which does not fire componentDidUpdate
|
||||
_ref(el) {
|
||||
this._el = el;
|
||||
this.componentDidUpdate();
|
||||
|
Loading…
Reference in New Issue
Block a user