Skip to content

Commit 01de45c

Browse files
committed
fix(lib/client): recursion in player.get and nullish operator
1 parent 2efa4ca commit 01de45c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/client/player.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ class PlayerInterface {
5151
if (!this.charId) return;
5252

5353
if (!(key in this)) {
54+
this[key] = exports.ox_core.CallPlayer('get', key) ?? null;
5455
this.on(key, (data: unknown) => (this[key] = data));
55-
this[key] = exports.ox_core.CallPlayer('get', key) || null;
5656
}
5757

5858
return this[key];

0 commit comments

Comments
 (0)