Skip to content

Commit

Permalink
Fix showing the wrong thing as voted (nil and nil were comparison che…
Browse files Browse the repository at this point in the history
…cking as true). Need to check if voted first.
  • Loading branch information
brung committed Feb 22, 2015
1 parent 9f221b6 commit b08047c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion unnamed/Model/Survey.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

@implementation Survey
- (BOOL)isCurrentVoteAnswer:(Answer *)answer {
return self.vote.answerIndex == answer.index;
return (self.voted && self.vote.answerIndex == answer.index);
}

- (id)initWithQuestion:(Question *)question {
Expand Down

0 comments on commit b08047c

Please sign in to comment.