From 376704d382df163c7a0db066900f021ea5f7894d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Tue, 1 Mar 2022 11:30:11 +0100 Subject: tpl/collections: Fix apply when function have Context as first arg As introduced in `partial` and `partialCached` in Hugo 0.93.0. Fixes #9585 --- common/hreflect/helpers.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'common') 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() -- cgit v1.2.3