Skip to content

Commit

Permalink
Merge branch 'tony/full-media' of https://github.com/cosmicjs/cosmic-…
Browse files Browse the repository at this point in the history
…sdk-js into canary
  • Loading branch information
tonyspiro committed Sep 11, 2024
2 parents 381cccb + 726b38f commit 962d198
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/addFullMedia.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const extractMediaFiles = (obj: any): string[] => {
const mediaFiles: string[] = [];
JSON.stringify(obj, (_, value) => {
if (value && typeof value === 'object') {
if (value.url && value.imgix_url) {
if (value.url || value.imgix_url) {
mediaFiles.push(value.url.split('/').pop().split('?')[0]);
}
}
Expand Down

0 comments on commit 962d198

Please sign in to comment.