bugfix nil check
This commit is contained in:
parent
cac7d87103
commit
6f3f13bdb7
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue