diff --git a/context.go b/context.go index 427f737..1e5414e 100644 --- a/context.go +++ b/context.go @@ -29,7 +29,7 @@ type Context struct { func NewContext(app *App, set *flag.FlagSet, parentCtx *Context) *Context { c := &Context{App: app, flagSet: set, parentContext: parentCtx} if parentCtx != nil { - if parentCtx.Context != nil { + if parentCtx.Context == nil { parentCtx.Context = context.Background() } c.Context = parentCtx.Context