aboutsummaryrefslogtreecommitdiffhomepage
path: root/common/hreflect
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2022-03-01 11:30:11 +0100
committerBjørn Erik Pedersen <[email protected]>2022-03-01 13:18:02 +0100
commit376704d382df163c7a0db066900f021ea5f7894d (patch)
tree97d09299795f58a4725d94b9b288b5c6aed64d8e /common/hreflect
parent41b5bc9637e064f6182dd37fe3077c1582614f5b (diff)
downloadhugo-376704d382df163c7a0db066900f021ea5f7894d.tar.gz
hugo-376704d382df163c7a0db066900f021ea5f7894d.zip
tpl/collections: Fix apply when function have Context as first arg
As introduced in `partial` and `partialCached` in Hugo 0.93.0. Fixes #9585
Diffstat (limited to 'common/hreflect')
-rw-r--r--common/hreflect/helpers.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/common/hreflect/helpers.go b/common/hreflect/helpers.go
index 0cc42ecc5..beab182bb 100644
--- a/common/hreflect/helpers.go
+++ b/common/hreflect/helpers.go
@@ -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()