Skip to content

Commit

Permalink
fix: coderabbit
Browse files Browse the repository at this point in the history
  • Loading branch information
ziscky committed Oct 4, 2024
1 parent 471d5e6 commit aff10e9
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions testutil/x/counter/depinject.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ func (am AppModule) IsOnePerModuleType() {}
func init() {
appconfig.RegisterModule(
&types.Module{},
appconfig.Invoke(InvokeSetHooks),
appconfig.Provide(ProvideModule),
appconfig.Invoke(InvokeSetHooks),
)
}

Expand Down Expand Up @@ -51,8 +51,11 @@ func ProvideModule(in ModuleInputs) ModuleOutputs {
}

func InvokeSetHooks(keeper *keeper.Keeper, counterHooks map[string]types.CounterHooksWrapper) error {
if keeper == nil || counterHooks == nil {
return nil
if keeper == nil {
return fmt.Errorf("keeper is nil")
}
if counterHooks == nil {
return fmt.Errorf("counterHooks is nil")
}

// Default ordering is lexical by module name.
Expand Down

0 comments on commit aff10e9

Please sign in to comment.