make metadata height and width nullable
post 965f7edd163a caused panic with null values for metadata height and width
This commit is contained in:
parent
e4a4e01618
commit
698b59fa90
2 changed files with 4 additions and 4 deletions
|
@ -40,8 +40,8 @@ type MediaResource{
|
|||
|
||||
type MetaData {
|
||||
id: String!
|
||||
originalWidth: Int!
|
||||
originalHeight: Int!
|
||||
originalWidth: Int
|
||||
originalHeight: Int
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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 .>"
|
||||
|
|
Loading…
Reference in a new issue