fix: don't show address in Contact if it's slice of empty strings

An alternative is to comment out the `address` in Params if it's unused.
This commit is contained in:
George Cushen committed 2019-09-14 21:51:33 +01:00
1 parent 2192b11d04
commit d486867326
1 file changed
+1 -1
+1 -1
View File
@@ -64,7 +64,7 @@
{{ end }}
{{ $addr_formatted := "" }}{{/* Scoping for maps. */}}
{{ if $data.address }}
{{ if $data.address.street | or $data.address.city | or $data.address.region | or $data.address.postcode | or $data.address.country }}
{{ $addr := slice }}
{{with $data.address.street}}{{$addr = $addr | append .}}{{end}}
{{with $data.address.city}}{{$addr = $addr | append .}}{{end}}