From 3c9980d34f8d0f18774855921e82c8cccf2528d0 Mon Sep 17 00:00:00 2001 From: Ilya Buzlov Date: Fri, 18 Sep 2020 14:38:16 +0300 Subject: [PATCH] Add checking of output for previous step in a block of steps (#7) * Fixes #6 issue: add checking of output for previous steps * Bump version --- cmd/effe/main.go | 2 +- strategies/blockcontext.go | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/effe/main.go b/cmd/effe/main.go index 1b38708..a73ed4a 100644 --- a/cmd/effe/main.go +++ b/cmd/effe/main.go @@ -14,7 +14,7 @@ import ( ) const ( - version = "0.1.0" + version = "0.1.2" ) func main() { diff --git a/strategies/blockcontext.go b/strategies/blockcontext.go index 2dbc3e7..a49341b 100644 --- a/strategies/blockcontext.go +++ b/strategies/blockcontext.go @@ -31,6 +31,9 @@ func (b *BlockContext) CalculateInput(calls []ComponentCall) { for _, inputField := range c.Input().List { var foundSourceOfArg bool for _, previous := range calls[:index] { + if previous.Output() == nil { + break + } foundSourceOfArg = fields.FindFieldWithType(previous.Output().List, inputField.Type) != nil if foundSourceOfArg { break