Simplify logic

This commit is contained in:
Andrew Kingston 2023-03-16 08:35:22 +00:00
parent 8d79a23700
commit 75057e2b05
1 changed files with 4 additions and 7 deletions

View File

@ -72,14 +72,11 @@
}) })
const makeLabel = setting => { const makeLabel = setting => {
if (setting.section) { const { section, label } = setting
let label = setting.section if (section) {
if (setting.label) { return label ? `${section} - ${label}` : section
return `${label} - ${setting.label}`
}
return label
} else { } else {
return setting.label return label
} }
} }