Merge pull request #776 from s00500/fix_report_menu

Fix report userId in report menu
This commit is contained in:
David Négrier 2021-02-27 23:16:23 +01:00 committed by GitHub
commit 48c13119bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -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();
}
}
}