fix: don't call Apply() twice

For some reason this was called by `Run()`. All tests pass without it,
so I'm not sure why it was there.

Fixes #481
This commit is contained in:
Alec Thomas
2024-12-29 07:42:25 +09:00
parent 840220c2ed
commit a14bb2072c
2 changed files with 24 additions and 5 deletions
-5
View File
@@ -803,11 +803,6 @@ func (c *Context) RunNode(node *Node, binds ...interface{}) (err error) {
if len(methods) == 0 {
return fmt.Errorf("no Run() method found in hierarchy of %s", c.Selected().Summary())
}
_, err = c.Apply()
if err != nil {
return err
}
for _, method := range methods {
if err = callFunction(method.method, method.binds); err != nil {
return err