From 2772d72eba66ed0665bfb4a5f03c358e72191fee Mon Sep 17 00:00:00 2001 From: Lukas Bachschwell Date: Wed, 24 Feb 2021 21:32:16 +0100 Subject: [PATCH] Fix report userId in report menu Signed-off-by: Lukas Bachschwell --- front/src/Phaser/Menu/ReportMenu.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/front/src/Phaser/Menu/ReportMenu.ts b/front/src/Phaser/Menu/ReportMenu.ts index bee86c35..1c3e8fd8 100644 --- a/front/src/Phaser/Menu/ReportMenu.ts +++ b/front/src/Phaser/Menu/ReportMenu.ts @@ -105,15 +105,15 @@ export class ReportMenu extends Phaser.GameObjects.DOMElement { gamePError.style.display = 'none'; const gameTextArea = this.getChildByID('gameReportInput') as HTMLInputElement; const gameIdUserReported = this.getChildByID('idUserReported') as HTMLInputElement; - if(!gameTextArea || !gameTextArea.value || !gameIdUserReported || !gameIdUserReported.value){ + if(!gameTextArea || !gameTextArea.value ){ gamePError.innerText = 'Report message cannot to be empty.'; gamePError.style.display = 'block'; return; } gameManager.getCurrentGameScene(this.scene).connection.emitReportPlayerMessage( - parseInt(gameIdUserReported.value), + this.userId, gameTextArea.value ); this.close(); } -} \ No newline at end of file +}