Simplify logic
This commit is contained in:
parent
8d79a23700
commit
75057e2b05
|
@ -72,14 +72,11 @@
|
|||
})
|
||||
|
||||
const makeLabel = setting => {
|
||||
if (setting.section) {
|
||||
let label = setting.section
|
||||
if (setting.label) {
|
||||
return `${label} - ${setting.label}`
|
||||
}
|
||||
return label
|
||||
const { section, label } = setting
|
||||
if (section) {
|
||||
return label ? `${section} - ${label}` : section
|
||||
} else {
|
||||
return setting.label
|
||||
return label
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue