Skip to content

Commit 85d19c3

Browse files
committed
fix: check for nil context
1 parent 6a73fcb commit 85d19c3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pkg/workflow/engineimpl.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@ func WithInstrumentationCollector(ic analytics.InstrumentationCollector) EngineI
6666

6767
func WithContext(ctx context.Context) EngineInvokeOption {
6868
return func(e *engineRuntimeConfig) {
69-
e.ctxFunc = func() context.Context { return ctx }
69+
if ctx != nil {
70+
e.ctxFunc = func() context.Context { return ctx }
71+
}
7072
}
7173
}
7274

0 commit comments

Comments
 (0)