using toggle instead of if else

Signed-off-by: Petrus.Z <silencly07@gmail.com>
This commit is contained in:
Petrus.Z 2021-11-17 16:52:57 +08:00
parent 29483abc62
commit 562fd6887a
No known key found for this signature in database
GPG Key ID: 71B321E14F898C3D

View File

@ -410,11 +410,8 @@ import template from './libraryoptionseditor.template.html';
} else {
parent.querySelector('.chkEnableEmbeddedEpisodeInfosContainer').classList.add('hide');
}
if (contentType === 'movies') {
parent.querySelector('.chkAutoCollectionContainer').classList.remove('hide');
} else {
parent.querySelector('.chkAutoCollectionContainer').classList.add('hide');
}
parent.querySelector('.chkAutoCollectionContainer').classList.toggle('hide', contentType !== 'movies');
return populateMetadataSettings(parent, contentType);
}