Fix React contexts (#12855)
This commit is contained in:
committed by
GitHub
parent
9b77279b3e
commit
b6addb4118
@@ -108,6 +108,8 @@ export default class MFileBody extends React.Component<IProps, IState> {
|
||||
public static contextType = RoomContext;
|
||||
public context!: React.ContextType<typeof RoomContext>;
|
||||
|
||||
public state: IState = {};
|
||||
|
||||
public static defaultProps = {
|
||||
showGenericPlaceholder: true,
|
||||
};
|
||||
@@ -117,12 +119,6 @@ export default class MFileBody extends React.Component<IProps, IState> {
|
||||
private userDidClick = false;
|
||||
private fileDownloader: FileDownloader = new FileDownloader(() => this.iframe.current);
|
||||
|
||||
public constructor(props: IProps) {
|
||||
super(props);
|
||||
|
||||
this.state = {};
|
||||
}
|
||||
|
||||
private getContentUrl(): string | null {
|
||||
if (this.props.forExport) return null;
|
||||
const media = mediaFromContent(this.props.mxEvent.getContent());
|
||||
|
||||
Reference in New Issue
Block a user