Skip to content

Commit 755355e

Browse files
authored
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.
1 parent 58441c2 commit 755355e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/ui/src/fields/Tabs/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ const TabsFieldComponent: TabsFieldClientComponent = (props) => {
112112
return tabPath
113113
}
114114

115-
const activeTabDescription = activeTabConfig.description
115+
const activeTabDescription = activeTabConfig?.description
116116
const activeTabStaticDescription =
117117
typeof activeTabDescription === 'function'
118118
? activeTabDescription({ t: i18n.t })

0 commit comments

Comments
 (0)