BUGFIX: order of locals and globasl in template parsing

This commit is contained in:
Simon Martens
2024-12-03 21:43:26 +01:00
parent 5f6886a144
commit 591b637652
11 changed files with 14 additions and 17 deletions

View File

@@ -51,7 +51,6 @@ func (r *TemplateRegistry) Load() error {
// TODO: what if there is no template in the directory above?
// What if a certain path is or should uncallable since it has no index or body?
func (r *TemplateRegistry) load() error {
// INFO: Parse setrs r.templates, which is why you need to make sure to call Parse() once
templates := make(map[string]TemplateContext)
fs.WalkDir(r.routesFS, ".", func(path string, d fs.DirEntry, err error) error {
if !d.IsDir() {