- if (this.game.mycolor && this.game.type == "corr") {
- ajax(
- "/chats",
- "DELETE",
- {gid: this.game.id},
- () => {
- // TODO: this.game.pastChats = [] could be enough here?
- this.$set(this.game, "pastChats", []);
- }
- );
+ if (this.game.type == "corr") {
+ if (this.game.mycolor)
+ ajax("/chats", "DELETE", {gid: this.game.id});
+ // TODO: this.game.chats = [] could be enough here?
+ this.$set(this.game, "chats", []);