Skip to content

Commit 22dd7e1

Browse files
authored
fix: console error tabs (#19315)
1 parent 499ab0d commit 22dd7e1

File tree

1 file changed

+3
-1
lines changed
  • packages/web-components/src/components/tabs

1 file changed

+3
-1
lines changed

packages/web-components/src/components/tabs/tabs.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,9 @@ export default class CDSTabs extends HostListenerMixin(CDSContentSwitcher) {
202202

203203
// Specifies child `<cds-tab>` to hide its divider instead of using CSS,
204204
// until `:host-context()` gets supported in all major browsers
205-
(nextItem as CDSTab).hideDivider = true;
205+
if (nextItem) {
206+
(nextItem as CDSTab).hideDivider = true;
207+
}
206208
}
207209

208210
protected _selectionDidChange(itemToSelect: CDSTab) {

0 commit comments

Comments
 (0)