Skip to content

Commit

Permalink
Fix nil check in begin from h.Open to h.Begin
Browse files Browse the repository at this point in the history
  • Loading branch information
takashabe committed Nov 14, 2023
1 parent ecb8191 commit dfa5978
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hooks.go
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ func (h *HooksContext) preBegin(c context.Context, conn *Conn) (interface{}, err
}

func (h *HooksContext) begin(c context.Context, ctx interface{}, conn *Conn) error {
if h == nil || h.Open == nil {
if h == nil || h.Begin == nil {
return nil
}
return h.Begin(c, ctx, conn)
Expand Down

0 comments on commit dfa5978

Please sign in to comment.