Skip to content

Commit

Permalink
runtime: return nil interface not nil pointer on error (#2376)
Browse files Browse the repository at this point in the history
Signed-off-by: Nuno Cruces <ncruces@users.noreply.github.com>
  • Loading branch information
ncruces authored Feb 15, 2025
1 parent a40188c commit 314bc41
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ func (r *runtime) InstantiateModule(

var sysCtx *internalsys.Context
if sysCtx, err = config.toSysContext(); err != nil {
return
return nil, err
}

name := config.name
Expand All @@ -340,7 +340,7 @@ func (r *runtime) InstantiateModule(
if code.closeWithModule {
_ = code.Close(ctx) // don't overwrite the error
}
return
return nil, err
}

if closeNotifier, ok := ctx.Value(expctxkeys.CloseNotifierKey{}).(experimentalapi.CloseNotifier); ok {
Expand Down

0 comments on commit 314bc41

Please sign in to comment.