tpl/tplimpl: Fix deprecation logic in embedded templates

Closes #11658
This commit is contained in:
Joe Mooring
2023-11-01 08:31:15 -07:00
committed by Bjørn Erik Pedersen
parent 5fa97ee964
commit cb98e9061b
2 changed files with 13 additions and 5 deletions

View File

@@ -44,8 +44,10 @@
{{- /* Deprecate site.Social.facebook_admin in favor of site.Params.social.facebook_admin */}}
{{- $facebookAdmin := "" }}
{{- with site.Params.social.facebook_admin }}
{{- $facebookAdmin = . }}
{{- with site.Params.social }}
{{- if reflect.IsMap . }}
{{- $facebookAdmin = .facebook_admin }}
{{- end }}
{{- else }}
{{- with site.Social.facebook_admin }}
{{- $facebookAdmin = . }}