]> git.cworth.org Git - lmno.games/blobdiff - empathy/empathy.jsx
Allow a user to un-select a star
[lmno.games] / empathy / empathy.jsx
index dc13edf5063ad403d4ffca275fedb86b7b39ccca..4ef6807fef559834be1fed0be1a6f9cb2f2ed889 100644 (file)
@@ -730,9 +730,15 @@ class Ambiguities extends React.PureComponent {
                           }
                 onClick={(event) => {
                   event.stopPropagation();
-                  this.setState({
-                    starred: set
-                  });
+                  if (this.state.starred === set) {
+                    this.setState({
+                      starred: null
+                    });
+                  } else {
+                    this.setState({
+                      starred: set
+                    });
+                  }
                 }}
               >
               {this.state.starred === set ?