From f1d2a7f33f9007031f79eff0d858847d1258fce2 Mon Sep 17 00:00:00 2001 From: z1glr Date: Sat, 19 Apr 2025 20:00:08 +0000 Subject: [PATCH] fixed bug in last commit --- backend/pkg/router/router.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/pkg/router/router.go b/backend/pkg/router/router.go index ef169c6..db110fe 100644 --- a/backend/pkg/router/router.go +++ b/backend/pkg/router/router.go @@ -137,7 +137,7 @@ func init() { path := c.Path() // if it is for the api, don't try to add the html extension - if path[1:4] != "dev" { + if len(path) < 4 || path[1:4] != "dev" { // check, wether a html-file exists for the path if _, err := os.Stat(filepath.Join("html", path)); errors.Is(err, os.ErrNotExist) { htmlPath := path + ".html"