mirror of
https://github.com/vector-im/element-web.git
synced 2025-11-29 14:31:22 +01:00
Silence React error about getDerivedStateFromProps (#29544)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
5b1be70ee8
commit
a32704ae5b
@ -64,6 +64,12 @@ export default class RightPanel extends React.Component<Props, IState> {
|
|||||||
public static contextType = MatrixClientContext;
|
public static contextType = MatrixClientContext;
|
||||||
declare public context: React.ContextType<typeof MatrixClientContext>;
|
declare public context: React.ContextType<typeof MatrixClientContext>;
|
||||||
|
|
||||||
|
public constructor(props: Props) {
|
||||||
|
super(props);
|
||||||
|
|
||||||
|
this.state = RightPanel.getDerivedStateFromProps(props);
|
||||||
|
}
|
||||||
|
|
||||||
private readonly delayedUpdate = throttle(
|
private readonly delayedUpdate = throttle(
|
||||||
(): void => {
|
(): void => {
|
||||||
this.forceUpdate();
|
this.forceUpdate();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user