chore(deps): update dependency typescript to v3.9.2 (#3776)

This commit is contained in:
renovate[bot]
2020-05-18 10:52:23 +03:00
committed by GitHub
parent 588622adb2
commit 5f99a9132b
2 changed files with 8 additions and 14 deletions

View File

@ -441,21 +441,15 @@ export default class GitGateway implements Implementation {
const { path, id } = displayURL as DisplayURLObject;
const client = await this.getLargeMediaClient();
if (client.enabled && client.matchPath(path)) {
return this.getLargeMediaDisplayURL({ path, id });
const largeMediaUrl = await this.getLargeMediaDisplayURL({ path, id });
return largeMediaUrl;
}
if (typeof displayURL === 'string') {
return displayURL;
}
if (this.backend!.getMediaDisplayURL) {
return this.backend!.getMediaDisplayURL(displayURL);
}
const err = new Error(
`getMediaDisplayURL is not implemented by the ${this.backendType} backend, but the backend returned a displayURL which was not a string!`,
) as Error & {
displayURL: DisplayURL;
};
err.displayURL = displayURL;
return Promise.reject(err);
const url = await this.backend!.getMediaDisplayURL(displayURL);
return url;
}
async getMediaFile(path: string) {