tpl/collections: Fix apply when function have Context as first arg

As introduced in `partial` and `partialCached` in Hugo 0.93.0.

Fixes #9585
This commit is contained in:
Bjørn Erik Pedersen
2022-03-01 11:30:11 +01:00
parent 41b5bc9637
commit 376704d382
4 changed files with 65 additions and 12 deletions

View File

@@ -17,6 +17,7 @@
package hreflect
import (
"context"
"reflect"
"github.com/gohugoio/hugo/common/types"
@@ -124,3 +125,5 @@ func indirectInterface(v reflect.Value) reflect.Value {
}
return v.Elem()
}
var ContextInterface = reflect.TypeOf((*context.Context)(nil)).Elem()