Skip to content

Commit

Permalink
Submitting review 39155d2
Browse files Browse the repository at this point in the history
Fixed updateThreadsStatus to modify original thread instances, rather than modifying copies
This is a proposed fix to #22

`updateThreadsStatus` was not actually updating the CommentThread instances, but updating copies thereof.
  • Loading branch information
ojarjur committed Jan 4, 2016
2 parents d2213d9 + 39155d2 commit 960eff4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion review/review.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ func updateThreadsStatus(threads []CommentThread) *bool {
sort.Sort(byTimestamp(threads))
noUnresolved := true
var result *bool
for _, thread := range threads {
for i := range threads {
thread := &threads[i]
thread.updateResolvedStatus()
if thread.Resolved != nil {
noUnresolved = noUnresolved && *thread.Resolved
Expand Down

0 comments on commit 960eff4

Please sign in to comment.