Skip to content

Commit 2f88f70

Browse files
committed
Handle missing attributes in playerStats
1 parent 436ee3b commit 2f88f70

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib/patches/playerStats.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,11 @@ function apply(stats, item, player) {
2525
break;
2626
}
2727

28-
const val = player[attr];
29-
30-
body.title = val.toString();
28+
if (attr in player && player[attr] !== null) {
29+
body.title = player[attr].toString();
30+
} else {
31+
line.remove();
32+
}
3133
}
3234
}
3335

0 commit comments

Comments
 (0)