Skip to content
Snippets Groups Projects
Commit 97ddb7eb authored by alexisben's avatar alexisben
Browse files

fix ratio partial when no dimensions

parent a1d1a789
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,9 @@
{{ $ratio := 1 }}
{{ if $image }}
{{ $ratio = div (float $image.width) (float $image.height) }}
{{ if and $image.width $image.height }}
{{ $ratio = div (float $image.width) (float $image.height) }}
{{ end }}
{{ end }}
{{ return $ratio }}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment