Conform src/components/views/messages/*
code to strictNullChecks
(#10461)
This commit is contained in:
parent
7cb90d0f78
commit
cefd94859c
21 changed files with 109 additions and 96 deletions
|
@ -63,17 +63,17 @@ export default class DownloadActionButton extends React.PureComponent<IProps, IS
|
|||
|
||||
if (this.state.blob) {
|
||||
// Cheat and trigger a download, again.
|
||||
return this.doDownload();
|
||||
return this.doDownload(this.state.blob);
|
||||
}
|
||||
|
||||
const blob = await this.props.mediaEventHelperGet().sourceBlob.value;
|
||||
this.setState({ blob });
|
||||
await this.doDownload();
|
||||
await this.doDownload(blob);
|
||||
};
|
||||
|
||||
private async doDownload(): Promise<void> {
|
||||
private async doDownload(blob: Blob): Promise<void> {
|
||||
await this.downloader.download({
|
||||
blob: this.state.blob,
|
||||
blob,
|
||||
name: this.props.mediaEventHelperGet().fileName,
|
||||
});
|
||||
this.setState({ loading: false });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue