Fixed corr challenge refused bug
authorBenjamin Auder <benjamin.auder@somewhere>
Wed, 4 Mar 2020 21:56:25 +0000 (22:56 +0100)
committerBenjamin Auder <benjamin.auder@somewhere>
Wed, 4 Mar 2020 21:56:25 +0000 (22:56 +0100)
client/src/views/Hall.vue

index 83de5a4..c943ff5 100644 (file)
@@ -254,7 +254,7 @@ export default {
       let names = {};
       response.challenges.forEach(c => {
         if (c.uid != this.st.user.id) names[c.uid] = "";
-        else if (!!c.target && c.target != this.st.user.id)
+        else if (c.target && c.target != this.st.user.id)
           names[c.target] = "";
       });
       const addChallenges = () => {
@@ -807,7 +807,7 @@ export default {
         this.launchGame(c);
       } else {
         const oppsid = this.getOppsid(c);
-        if (oppSid)
+        if (oppsid)
           this.send("refusechallenge", { data: c.id, target: oppsid });
       }
       this.send("deletechallenge", { data: c.id });