Fix broken qunit tests.

This commit is contained in:
Guo Xiang Tan
2017-02-03 12:09:30 +08:00
parent 7a243e859e
commit 0988420b48
2 changed files with 4 additions and 5 deletions

View File

@@ -190,7 +190,7 @@ createWidget('discourse-poll-standard-results', {
return ordered.map((option, idx) => {
const contents = [];
const per = rounded[idx].toString();
const chosen = attrs.vote.includes(option.id);
const chosen = (attrs.vote || []).includes(option.id);
contents.push(h('div.option',
h('p', [ h('span.percentage', `${per}%`), optionHtml(option) ])