From 562fd6887a27d337652d27cf0c375c67a6e07a52 Mon Sep 17 00:00:00 2001 From: "Petrus.Z" Date: Wed, 17 Nov 2021 16:52:57 +0800 Subject: [PATCH] using toggle instead of if else Signed-off-by: Petrus.Z --- .../libraryoptionseditor/libraryoptionseditor.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/components/libraryoptionseditor/libraryoptionseditor.js b/src/components/libraryoptionseditor/libraryoptionseditor.js index 717e3f5c96..5e9ca5dbc9 100644 --- a/src/components/libraryoptionseditor/libraryoptionseditor.js +++ b/src/components/libraryoptionseditor/libraryoptionseditor.js @@ -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); }