fix(git-gateway): fix previews for GitHub images not in Large Media (#2125)
This commit is contained in:
committed by
Shawn Erquhart
parent
a6c5ba5722
commit
d17f896f47
@ -215,12 +215,14 @@ export default class GitGateway {
|
||||
return mediaFiles;
|
||||
}
|
||||
const largeMediaURLThunks = await this.getLargeMedia(mediaFiles);
|
||||
return mediaFiles.map(({ id, url, getDisplayURL, ...rest }) => ({
|
||||
return mediaFiles.map(({ id, url, urlIsPublicPath, getDisplayURL, ...rest }) => ({
|
||||
...rest,
|
||||
id,
|
||||
url,
|
||||
urlIsPublicPath: false,
|
||||
getDisplayURL: largeMediaURLThunks[id] ? largeMediaURLThunks[id] : getDisplayURL,
|
||||
urlIsPublicPath: largeMediaURLThunks[id] ? false : urlIsPublicPath,
|
||||
getDisplayURL: largeMediaURLThunks[id]
|
||||
? largeMediaURLThunks[id]
|
||||
: getDisplayURL || (url && (() => Promise.resolve(url))),
|
||||
}));
|
||||
},
|
||||
);
|
||||
|
Reference in New Issue
Block a user