From: Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Date: Sat, 6 Oct 2018 10:04:29 +0000 (+0200)
Subject: tpl: Fix baseof.html in error message
X-Git-Tag: v0.50~70
X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=646a52a5c;p=brevno-suite%2Fhugo

tpl: Fix baseof.html in error message

This fix should also make the template loadin slightly faster, as we avoid to reparse the baseof.html files more than one time.

Fixes #5288
---

diff --git a/tpl/tplimpl/template.go b/tpl/tplimpl/template.go
index f19c312e..54f4aeda 100644
--- a/tpl/tplimpl/template.go
+++ b/tpl/tplimpl/template.go
@@ -568,7 +568,7 @@ func (t *htmlTemplates) handleMaster(name, overlayFilename, masterFilename strin
 			return err
 		}
 
-		masterTpl, err = t.t.New(overlayFilename).Parse(templ)
+		masterTpl, err = t.t.New(masterFilename).Parse(templ)
 		if err != nil {
 			return err
 		}
@@ -609,7 +609,7 @@ func (t *textTemplates) handleMaster(name, overlayFilename, masterFilename strin
 			return err
 		}
 
-		masterTpl, err = t.t.New(overlayFilename).Parse(templ)
+		masterTpl, err = t.t.New(masterFilename).Parse(templ)
 		if err != nil {
 			return err
 		}