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