]> git.cworth.org Git - lmno.games/blobdiff - empathy/empathy.jsx
Use triple-equals instead of double
[lmno.games] / empathy / empathy.jsx
index 21b766ab689c3c8c652275f16d495387e40faaaa..6f051f484f3ca3dfc71a21835ac787360192f434 100644 (file)
@@ -328,7 +328,7 @@ class ActivePrompt extends React.PureComponent {
     const response = await fetch_post_json(`answer/${this.props.prompt.id}`, {
       answers: this.answers.map(r => r.current.value)
     });
-    if (response.status == 200) {
+    if (response.status === 200) {
       const result = await response.json();
       if (! result.valid) {
         add_message("danger", result.message);
@@ -368,7 +368,7 @@ class ActivePrompt extends React.PureComponent {
         </p>
         <h2>{this.props.prompt.prompt}</h2>
         <form onSubmit={this.handle_submit}>
-          {Array(this.props.prompt.items).fill(null).map((whocares,i) => {
+          {[...Array(this.props.prompt.items)].map((whocares,i) => {
             return (
               <div
                 key={i}