Skip to content

Commit b499cce

Browse files
authored
fix: update SelectQuery.Clone to properly handle non-nil empty arg slices (#1299)
Closes: #1298
1 parent 9f8a5f3 commit b499cce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

query_select.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1118,7 +1118,7 @@ func (q *SelectQuery) Clone() *SelectQuery {
11181118
}
11191119

11201120
cloneArgs := func(args []schema.QueryWithArgs) []schema.QueryWithArgs {
1121-
if len(args) == 0 {
1121+
if args == nil {
11221122
return nil
11231123
}
11241124
clone := make([]schema.QueryWithArgs, len(args))

0 commit comments

Comments
 (0)