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

@ -103,7 +103,7 @@ export function displayAiringDate(element: HTMLElement, now: Date) {
}
export function displayDate(element: HTMLElement, now: Date) {
if(element.dataset.date === "") {
if(!element.dataset.date) {
element.textContent = ""
return
}