Skip to content

Commit

Permalink
Merge branch 'tony/full-media' into merge-test
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyspiro committed Sep 7, 2024
2 parents 8aac471 + a21857e commit 346bebf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/utils/addFullMedia.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ const mapMediaDataToResponse = (
if (obj && typeof obj === 'object') {
Object.keys(obj).forEach((key) => {
if (obj[key] && typeof obj[key] === 'object') {
if (obj[key].url && obj[key].imgix_url) {
const filename = obj[key].url.split('/').pop().split('?')[0];
const url = obj[key].imgix_url || obj[key].url;
if (url) {
const filename = url.split('/').pop().split('?')[0];
if (mediaMap.has(filename)) {
// eslint-disable-next-line no-param-reassign
if (!props.includes('name')) {
Expand Down

0 comments on commit 346bebf

Please sign in to comment.