for (let word of props.words) {
const word_canon = canonize(word);
- console.log("Canonized " + word + " to " + word_canon);
let found_match = false;
for (let set of word_sets) {
const set_canon = canonize(set.values().next().value);
- console.log("Comparing " + word_canon + " to " + set_canon);
if (word_canon === set_canon) {
set.add(word);
found_match = true;;
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
}
);