Fixed missing input check

This commit is contained in:
2018-11-15 13:04:14 +09:00
parent 1ef1c55e49
commit a12b749ee9
2 changed files with 29 additions and 1 deletions

View File

@ -175,7 +175,10 @@ export default class AnimeNotifier {
// Auto-focus first input element on welcome page.
if(location.pathname === "/welcome") {
let firstInput = this.app.content.getElementsByTagName("input")[0] as HTMLInputElement
firstInput.focus()
if(firstInput) {
firstInput.focus()
}
}
}