From: Carl Worth Date: Mon, 29 Jun 2020 15:06:54 +0000 (-0700) Subject: Set kudos to null if no answer is starred X-Git-Url: https://git.cworth.org/git?p=lmno.games;a=commitdiff_plain;h=0dfce9dfcf903be9bb4bd27a3b9121c81ac4cfa4;hp=5d49d1235592034458ce875b5d73d024ef23355d Set kudos to null if no answer is starred This fixes the bug we saw last night where nobody could submit judging results until they had starred at least one item. --- diff --git a/empathy/empathy.jsx b/empathy/empathy.jsx index 5782b78..bc70a85 100644 --- a/empathy/empathy.jsx +++ b/empathy/empathy.jsx @@ -503,7 +503,7 @@ class Ambiguities extends React.PureComponent { const response = await fetch_post_json( `judged/${this.props.prompt.id}`,{ word_groups: this.state.word_sets.map(set => Array.from(set)), - kudos: Array.from(this.state.starred) + kudos: this.state.starred ? Array.from(this.state.starred) : null } );