From 55cec7af1745bb7bc1747cff3363f3c1b5689220 Mon Sep 17 00:00:00 2001 From: Lea Anthony Date: Sun, 3 Apr 2022 17:58:53 +1000 Subject: [PATCH] Fix: Handle struct pointers in new TS generation --- v2/internal/binding/reflect.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/v2/internal/binding/reflect.go b/v2/internal/binding/reflect.go index e8979316..ff079120 100755 --- a/v2/internal/binding/reflect.go +++ b/v2/internal/binding/reflect.go @@ -91,7 +91,7 @@ func (b *Bindings) getMethods(value interface{}) ([]*BoundMethod, error) { a := reflect.New(typ) s := reflect.Indirect(a).Interface() b.converter.Add(s) - boundMethod.StructNames = append(boundMethod.StructNames, thisInput.Name()) + boundMethod.StructNames = append(boundMethod.StructNames, typ.Name()) } } @@ -130,7 +130,7 @@ func (b *Bindings) getMethods(value interface{}) ([]*BoundMethod, error) { a := reflect.New(typ) s := reflect.Indirect(a).Interface() b.converter.Add(s) - boundMethod.StructNames = append(boundMethod.StructNames, thisOutput.Name()) + boundMethod.StructNames = append(boundMethod.StructNames, typ.Name()) } }