Skip to content

Commit 6be6c8b

Browse files
committed
fix leave parser returning undefined instead of null for missing player
1 parent c047bdf commit 6be6c8b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

parsers/leave.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ class LeaveParser extends BaseParser {
2626
if (!match)
2727
return null;
2828

29-
return this._brikkit._players.find(p => p._controller === match[1]);
29+
const player = this._brikkit._players.find(p => p._controller === match[1]);
30+
return player !== undefined ? player : null;
3031
}
3132
}
3233

0 commit comments

Comments
 (0)