Skip to content

Commit

Permalink
fix(lib/client): recursion in player.get and nullish operator
Browse files Browse the repository at this point in the history
  • Loading branch information
thelindat committed Nov 13, 2024
1 parent 2efa4ca commit 01de45c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/client/player.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ class PlayerInterface {
if (!this.charId) return;

if (!(key in this)) {
this[key] = exports.ox_core.CallPlayer('get', key) ?? null;
this.on(key, (data: unknown) => (this[key] = data));
this[key] = exports.ox_core.CallPlayer('get', key) || null;
}

return this[key];
Expand Down

0 comments on commit 01de45c

Please sign in to comment.