Simplify logic
This commit is contained in:
parent
8d79a23700
commit
75057e2b05
|
@ -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