From d737116438d84785f2cee6661b35c18fef039a64 Mon Sep 17 00:00:00 2001 From: Benjamin Auder Date: Tue, 26 Mar 2019 19:37:15 +0100 Subject: [PATCH] Add debug traces --- client/src/views/Hall.vue | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/client/src/views/Hall.vue b/client/src/views/Hall.vue index b2ab334f..9b5265ad 100644 --- a/client/src/views/Hall.vue +++ b/client/src/views/Hall.vue @@ -395,6 +395,7 @@ export default { } case "deletechallenge": { + console.log("receive delete"); ArrayFun.remove(this.challenges, c => c.id == data.cid); break; } @@ -495,6 +496,9 @@ export default { // * - prepare and start new game (if challenge is full after acceptation) // * --> include challenge ID (so that opponents can delete the challenge too) clickChallenge: function(c) { + + console.log(c); + if (!!c.accepted) { this.st.conn.send(JSON.stringify({code: "withdrawchallenge", @@ -512,6 +516,7 @@ export default { else if (c.from.sid == this.st.user.sid || (this.st.user.id > 0 && c.from.id == this.st.user.id)) { + console.log("send delete"); // It's my challenge: cancel it this.sendSomethingTo(c.to, "deletechallenge", {cid:c.id}); ArrayFun.remove(this.challenges, ch => ch.id == c.id); -- 2.44.0