Skip to content

Commit

Permalink
Fix scoreboard delete handler not first checking if scoreboard exists (
Browse files Browse the repository at this point in the history
…#3324)

* Little big oversight

* Right...
  • Loading branch information
Ynfuien committed Mar 14, 2024
1 parent d77a051 commit d9e9e15
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/plugins/scoreboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ function inject (bot) {

for (const position in ScoreBoard.positions) {
const scoreboard = ScoreBoard.positions[position]
if (scoreboard.name === packet.name) {

if (scoreboard && scoreboard.name === packet.name) {
delete ScoreBoard.positions[position]
break
}
Expand Down

0 comments on commit d9e9e15

Please sign in to comment.