Use zebra striping variable correctly

This commit is contained in:
narcolepticinsomniac 2018-08-24 20:34:59 -04:00 committed by GitHub
parent e0bb15bf2d
commit bf732f7bd0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -284,8 +284,8 @@ function showStyles(styles) {
window.dispatchEvent(new Event('showStyles:done'));
});
var reverseZebra = $('.entry:last-child:nth-of-type(odd)');
if (reverseZebra !== null) {
var reverseZebra = $('.entry:last-child:nth-of-type(odd)') !== null;
if (reverseZebra) {
$('#installed').classList.add('reverse-stripe');
} else {
$('#installed').classList.remove('reverse-stripe');
@ -538,8 +538,8 @@ function handleDelete(id) {
installed.appendChild(template.noStyles.cloneNode(true));
}
var reverseZebra = $('.entry:last-child:nth-of-type(odd)');
if (reverseZebra !== null) {
var reverseZebra = $('.entry:last-child:nth-of-type(odd)') !== null;
if (reverseZebra) {
$('#installed').classList.add('reverse-stripe');
} else {
$('#installed').classList.remove('reverse-stripe');