fix(backend-git-gateway): fix image display w/o large media (#2271)
This commit is contained in:
parent
9b1dfe1605
commit
6c3506b4d0
@ -212,7 +212,10 @@ export default class GitGateway {
|
||||
return Promise.all([this.backend.getMedia(), this.getLargeMediaClient()]).then(
|
||||
async ([mediaFiles, largeMediaClient]) => {
|
||||
if (!largeMediaClient.enabled) {
|
||||
return mediaFiles;
|
||||
return mediaFiles.map(({ displayURL, ...rest }) => ({
|
||||
...rest,
|
||||
displayURL: { original: displayURL },
|
||||
}));
|
||||
}
|
||||
const largeMediaDisplayURLs = await this.getLargeMediaDisplayURLs(mediaFiles);
|
||||
return mediaFiles.map(({ id, displayURL, path, ...rest }) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user