From 720dcd8d13d353836b0c83a5d82044ecca457d32 Mon Sep 17 00:00:00 2001 From: James Monger Date: Tue, 13 Sep 2022 05:27:12 +0100 Subject: [PATCH] fix: initialise `metadata` within Player Fixes an issue introduced in #376 --- src/engine/world/actor/player/player.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/engine/world/actor/player/player.ts b/src/engine/world/actor/player/player.ts index 47445e4bb..bf214507a 100644 --- a/src/engine/world/actor/player/player.ts +++ b/src/engine/world/actor/player/player.ts @@ -124,11 +124,9 @@ export class Player extends Actor { * You cannot guarantee that this will be populated with data, so you should always check for the existence of the * metadata you are looking for before using it. * - * The ! is used to tell the compiler that we know this property will be defined. - * * @author jameskmonger */ - public readonly metadata!: (Actor['metadata'] & Partial); + public readonly metadata: (Actor['metadata'] & Partial) = {}; private readonly _socket: Socket; private readonly _inCipher: Isaac;