Skip to content

Commit

Permalink
edit: url or imgix_url to get filename
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyspiro committed Sep 7, 2024
1 parent a21857e commit 726b38f
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 726b38f

Please sign in to comment.