Skip to content

Commit

Permalink
fix(live-updates): add support for videos, currently they are not pro…
Browse files Browse the repository at this point in the history
…cessed correctly
  • Loading branch information
chrishelgert committed May 12, 2023
1 parent 598dbcd commit 888fb2b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/graphql/assets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ export function updateAsset<T extends (Entity & { sys: SysProps }) | EntryProps>
title: updateFromEntryEditor.fields.title[locale],
description: updateFromEntryEditor.fields.description?.[locale],
contentType: file.contentType,
width: file.details?.image.width,
height: file.details?.image.height,
url: setProtocolToHttps(file.url),
// Note: video has no `width` and `height`
width: file.details?.image?.width,
height: file.details?.image?.height,
};
} catch (err) {
// During file upload it will throw an error and return the original data in the meantime
Expand Down

0 comments on commit 888fb2b

Please sign in to comment.