make metadata height and width nullable

post 965f7edd163a caused panic with null values for metadata height and
width
This commit is contained in:
realaravinth 2021-11-01 08:51:54 +05:30
parent e4a4e01618
commit 698b59fa90
No known key found for this signature in database
GPG Key ID: AD9F0F08E855ED88
2 changed files with 4 additions and 4 deletions

View File

@ -40,8 +40,8 @@ type MediaResource{
type MetaData {
id: String!
originalWidth: Int!
originalHeight: Int!
originalWidth: Int
originalHeight: Int
}

View File

@ -1,7 +1,7 @@
<. let metadata = p.metadata.as_ref().unwrap(); .>
<!-- TODO deal with layouts
height="<.= metadata.original_height.>"
width="<.= metadata.original_width.>"
height="<.# metadata.original_height.>"
width="<.# metadata.original_width.>"
-->
<img
src="https://miro.medium.com/<.= metadata.id .>"