Improve code readability

af30991d7740cba96a41e664eb82d7106cc86067

d-ber <davide.bertalero@studenti.unimi.it>

1 files changed, +10 -4Ignore whitespace
public/scripts/tags.js+10 -4
@@ -750,10 +750,16 @@ async function handleTagImport(character, { importAll = false, importExisting =
750 const folderTags = getOpenBogusFolders();750 const folderTags = getOpenBogusFolders();
751751
752 // Choose the setting for this dialog. If from settings, verify the setting really exists, otherwise take "ASK".752 // Choose the setting for this dialog. If from settings, verify the setting really exists, otherwise take "ASK".
753 const setting = forceShow ? tag_import_setting.ASK753 let setting;
754 : importAll ? tag_import_setting.ALL754 if (forceShow) {
755 : importExisting ? tag_import_setting.ONLY_EXISTING755 setting = tag_import_setting.ASK;
756 : Object.values(tag_import_setting).find(setting => setting === power_user.tag_import_setting) ?? tag_import_setting.ASK;756 } else if (importAll) {
757 setting = tag_import_setting.ALL;
758 } else if (importExisting) {
759 setting = tag_import_setting.ONLY_EXISTING;
760 } else {
761 setting = Object.values(tag_import_setting).find(setting => setting === power_user.tag_import_setting) ?? tag_import_setting.ASK;
762 }
757763
758 switch (setting) {764 switch (setting) {
759 case tag_import_setting.ALL:765 case tag_import_setting.ALL: