Skip to content

Commit 152c6af

Browse files
0rzechlafriks
authored andcommitted
Fix custom templates being ignored (#4638)
1 parent 00bd627 commit 152c6af

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

modules/templates/static.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,21 +112,19 @@ func NewTemplateFileSystem() templateFileSystem {
112112
return fs
113113
}
114114

115-
var tplFileSys = NewTemplateFileSystem()
116-
117115
// HTMLRenderer implements the macaron handler for serving HTML templates.
118116
func HTMLRenderer() macaron.Handler {
119117
return macaron.Renderer(macaron.RenderOptions{
120118
Funcs: NewFuncMap(),
121-
TemplateFileSystem: tplFileSys,
119+
TemplateFileSystem: NewTemplateFileSystem(),
122120
})
123121
}
124122

125123
// JSONRenderer implements the macaron handler for serving JSON templates.
126124
func JSONRenderer() macaron.Handler {
127125
return macaron.Renderer(macaron.RenderOptions{
128126
Funcs: NewFuncMap(),
129-
TemplateFileSystem: tplFileSys,
127+
TemplateFileSystem: NewTemplateFileSystem(),
130128
HTMLContentType: "application/json",
131129
})
132130
}

0 commit comments

Comments
 (0)