Improve code readability

af30991d7740cba96a41e664eb82d7106cc86067

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

1 files changed, +10 -4Showing whitespace changes
public/scripts/tags.js+10 -4
@@ -750,10 +750,16 @@ async function handleTagImport(character, { importAll = false, importExisting =
750750 const folderTags = getOpenBogusFolders();
751751
752752 // Choose the setting for this dialog. If from settings, verify the setting really exists, otherwise take "ASK".
753- const setting = forceShow ? tag_import_setting.ASK
753+ let setting;
754- : importAll ? tag_import_setting.ALL
754+ if (forceShow) {
755- : importExisting ? tag_import_setting.ONLY_EXISTING
755+ 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
758764 switch (setting) {
759765 case tag_import_setting.ALL: