From 6f3f13bdb756ebeb6a766b1dcdf6374629a9dac3 Mon Sep 17 00:00:00 2001 From: Robert Janetzko Date: Sat, 30 Apr 2022 11:35:56 +0000 Subject: [PATCH] bugfix nil check --- backend/server/resource.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/server/resource.go b/backend/server/resource.go index 523e65f..67a7a04 100644 --- a/backend/server/resource.go +++ b/backend/server/resource.go @@ -19,7 +19,7 @@ func (srv *DfServer) RegisterWorldPage(path string, template string, accessor fu } data := accessor(mux.Vars(r)) - if reflect.ValueOf(data).IsNil() { + if data == nil || (reflect.ValueOf(data).Kind() == reflect.Ptr && reflect.ValueOf(data).IsNil()) { srv.notFound(w) return }