Handle NaN case for notification count

This commit is contained in:
Eduard Urbach 2018-10-28 12:52:20 +09:00
parent 9b6d2db7f0
commit 528ba49dee

View File

@ -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
}