diff --git a/front/src/Components/Menu/ProfileSubMenu.svelte b/front/src/Components/Menu/ProfileSubMenu.svelte index e2a3a05a..c4b0c16c 100644 --- a/front/src/Components/Menu/ProfileSubMenu.svelte +++ b/front/src/Components/Menu/ProfileSubMenu.svelte @@ -7,7 +7,7 @@ import {loginSceneVisibleStore} from "../../Stores/LoginSceneStore"; import {selectCharacterSceneVisibleStore} from "../../Stores/SelectCharacterStore"; import {SelectCharacterScene, SelectCharacterSceneName} from "../../Phaser/Login/SelectCharacterScene"; - import {connectionManager} from "../../Connexion/ConnectionManager"; + //import {connectionManager} from "../../Connexion/ConnectionManager"; function disableMenuStores(){ diff --git a/front/src/Components/ReportMenu/ReportSubMenu.svelte b/front/src/Components/ReportMenu/ReportSubMenu.svelte index 40a2cb1a..36bf878b 100644 --- a/front/src/Components/ReportMenu/ReportSubMenu.svelte +++ b/front/src/Components/ReportMenu/ReportSubMenu.svelte @@ -2,7 +2,7 @@ import {showReportScreenStore} from "../../Stores/ShowReportScreenStore"; import {gameManager} from "../../Phaser/Game/GameManager"; - export let userUUID: string; + export let userUUID: string | undefined; let reportMessage: string; let hiddenError = true; @@ -11,6 +11,9 @@ hiddenError = true; } else { hiddenError = false; + if( userUUID === undefined) { + throw ('User UUID is not valid.'); + } gameManager.getCurrentGameScene().connection?.emitReportPlayerMessage(userUUID, reportMessage); showReportScreenStore.set(null) }