fix(ui): description undefined error on empty tabs array (#8830)
Fixes an error that occurs when `tabs` array is empty or active tab config is undefined due to missing optional chaining operator.
This commit is contained in:
@@ -112,7 +112,7 @@ const TabsFieldComponent: TabsFieldClientComponent = (props) => {
|
|||||||
return tabPath
|
return tabPath
|
||||||
}
|
}
|
||||||
|
|
||||||
const activeTabDescription = activeTabConfig.description
|
const activeTabDescription = activeTabConfig?.description
|
||||||
const activeTabStaticDescription =
|
const activeTabStaticDescription =
|
||||||
typeof activeTabDescription === 'function'
|
typeof activeTabDescription === 'function'
|
||||||
? activeTabDescription({ t: i18n.t })
|
? activeTabDescription({ t: i18n.t })
|
||||||
|
|||||||
Reference in New Issue
Block a user