Simplify logic
This commit is contained in:
parent
c635dbf5c4
commit
c437c27a9e
|
@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue