Handle NaN case for notification count
This commit is contained in:
parent
9b6d2db7f0
commit
528ba49dee
@ -18,6 +18,10 @@ export default class NotificationManager {
|
||||
let body = await response.text()
|
||||
this.unseen = parseInt(body)
|
||||
|
||||
if(isNaN(this.unseen)) {
|
||||
this.unseen = 0
|
||||
}
|
||||
|
||||
if(this.unseen > 99) {
|
||||
this.unseen = 99
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user