fixed bug in last commit
This commit is contained in:
@@ -137,7 +137,7 @@ func init() {
|
|||||||
path := c.Path()
|
path := c.Path()
|
||||||
|
|
||||||
// if it is for the api, don't try to add the html extension
|
// 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
|
// check, wether a html-file exists for the path
|
||||||
if _, err := os.Stat(filepath.Join("html", path)); errors.Is(err, os.ErrNotExist) {
|
if _, err := os.Stat(filepath.Join("html", path)); errors.Is(err, os.ErrNotExist) {
|
||||||
htmlPath := path + ".html"
|
htmlPath := path + ".html"
|
||||||
|
|||||||
Reference in New Issue
Block a user