website refactor
This commit is contained in:
@@ -5,7 +5,10 @@
|
||||
*/
|
||||
|
||||
export class DashboardCountDisplay {
|
||||
static format(count: number): string {
|
||||
static format(count: number | null | undefined): string {
|
||||
if (count === null || count === undefined) {
|
||||
return '0';
|
||||
}
|
||||
return count.toString();
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,10 @@
|
||||
*/
|
||||
|
||||
export class DashboardLeaguePositionDisplay {
|
||||
static format(position: number): string {
|
||||
static format(position: number | null | undefined): string {
|
||||
if (position === null || position === undefined) {
|
||||
return '-';
|
||||
}
|
||||
return `#${position}`;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user