Skip to content

Commit

Permalink
fix: reuse patched version for each operation apply
Browse files Browse the repository at this point in the history
  • Loading branch information
denouche committed Jan 17, 2023
1 parent 3bf93b8 commit 91e57db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion model_patchrequests.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ func (prs *PatchRequests[T]) Apply(initialResource *T, newer func() *T) (*T, err
var err error
patched := initialResource
for _, pr := range prs.Patches {
patched, err = pr.Apply(initialResource, newer())
patched, err = pr.Apply(patched, newer())
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 91e57db

Please sign in to comment.