1
0
mirror of https://github.com/gohugoio/hugo.git synced 2024-05-11 05:54:58 +00:00

tpl: Fix nil pointer in Tree()

Fixes #3285
This commit is contained in:
Bjørn Erik Pedersen
2017-04-05 22:11:24 +02:00
parent b31da911b5
commit 6650fae7ad

View File

@ -88,7 +88,7 @@ func (t *TemplateAdapter) Tree() string {
panic("Unknown template")
}
if tree.Root == nil {
if tree == nil || tree.Root == nil {
return ""
}
s := tree.Root.String()