Added null checks

This commit is contained in:
2019-04-19 22:50:52 +09:00
parent 707233a422
commit d16197340d
8 changed files with 31 additions and 18 deletions

View File

@ -5,9 +5,9 @@ export default class NotificationManager {
icon: HTMLElement
counter: HTMLElement
constructor() {
this.icon = document.getElementById("notification-icon")
this.counter = document.getElementById("notification-count")
constructor(icon: HTMLElement, counter: HTMLElement) {
this.icon = icon
this.counter = counter
}
async update() {