Made edit button not work when end time not specified

This commit is contained in:
Ajay Ramachandran
2019-07-29 14:20:55 -04:00
parent 919f9f56bd
commit a66804064a

View File

@@ -388,9 +388,13 @@ function getSponsorTimesMessageDiv(sponsorTimes) {
currentSponsorTimeContainer.innerText = currentSponsorTimeMessage; currentSponsorTimeContainer.innerText = currentSponsorTimeMessage;
sponsorTimesContainer.appendChild(currentSponsorTimeContainer); sponsorTimesContainer.appendChild(currentSponsorTimeContainer);
sponsorTimesContainer.appendChild(deleteButton); sponsorTimesContainer.appendChild(deleteButton);
//only if it is a complete sponsor time
if (sponsorTimes[i].length > 1) {
sponsorTimesContainer.appendChild(spacer); sponsorTimesContainer.appendChild(spacer);
sponsorTimesContainer.appendChild(editButton); sponsorTimesContainer.appendChild(editButton);
} }
}
return sponsorTimesContainer; return sponsorTimesContainer;
} }