Skip to content

Commit 720dcd8

Browse files
committed
fix: initialise metadata within Player
Fixes an issue introduced in #376
1 parent e8f41bc commit 720dcd8

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/engine/world/actor/player/player.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,9 @@ export class Player extends Actor {
124124
* You cannot guarantee that this will be populated with data, so you should always check for the existence of the
125125
* metadata you are looking for before using it.
126126
*
127-
* The ! is used to tell the compiler that we know this property will be defined.
128-
*
129127
* @author jameskmonger
130128
*/
131-
public readonly metadata!: (Actor['metadata'] & Partial<PlayerMetadata>);
129+
public readonly metadata: (Actor['metadata'] & Partial<PlayerMetadata>) = {};
132130

133131
private readonly _socket: Socket;
134132
private readonly _inCipher: Isaac;

0 commit comments

Comments
 (0)