X-Git-Url: https://git.auder.net/?p=vchess.git;a=blobdiff_plain;f=client%2Fsrc%2Fcomponents%2FGameList.vue;h=98eaf33f0c107a5c3418cc4eb7865695843451c3;hp=39ad9bf2375a0eec596caeccbe414a54b08ac9cc;hb=f9c36b2da005b596ad656f4b6cc4e09ef3c656f1;hpb=8d1fcc37a933554e13bc996b5611f8307a4701e8 diff --git a/client/src/components/GameList.vue b/client/src/components/GameList.vue index 39ad9bf2..98eaf33f 100644 --- a/client/src/components/GameList.vue +++ b/client/src/components/GameList.vue @@ -134,7 +134,13 @@ export default { return res; }, deleteGame: function(game, e) { - if (game.score != "*") { + if ( + game.score != "*" && + game.players.some(p => + p.sid == this.st.user.sid || + p.uid == this.st.user.id + ) + ) { if (confirm(this.st.tr["Remove game?"])) { GameStorage.remove( game.id,