mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-31 22:41:53 +02:00
@@ -27,7 +27,7 @@ func init() {
|
||||
s := d.Site
|
||||
ns := &internal.TemplateFuncsNamespace{
|
||||
Name: name,
|
||||
Context: func(args ...interface{}) interface{} { return s },
|
||||
Context: func(args ...interface{}) (interface{}, error) { return s, nil },
|
||||
}
|
||||
|
||||
if s == nil {
|
||||
|
@@ -43,5 +43,7 @@ func TestInit(t *testing.T) {
|
||||
}
|
||||
|
||||
c.Assert(found, qt.Equals, true)
|
||||
c.Assert(ns.Context(), hqt.IsSameType, s)
|
||||
ctx, err := ns.Context()
|
||||
c.Assert(err, qt.IsNil)
|
||||
c.Assert(ctx, hqt.IsSameType, s)
|
||||
}
|
||||
|
Reference in New Issue
Block a user