File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
src/jigsaw/component/tabs Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -596,11 +596,13 @@ export class JigsawTab extends AbstractJigsawComponent implements AfterViewInit,
596596 this . _tabLabels . forEach ( ( label : JigsawTabLabel , index ) => {
597597 let title = "" ;
598598 let rootNodes = ( < EmbeddedViewRef < any > > label . _tabItemRef ) . rootNodes ;
599- for ( let i = 0 ; i < rootNodes . length ; i ++ ) {
600- if ( rootNodes [ i ] instanceof HTMLElement ) {
601- title += " " + rootNodes [ i ] . outerHTML ;
602- } else {
603- title += " " + rootNodes [ i ] . textContent . trim ( ) ;
599+ if ( rootNodes ) {
600+ for ( let i = 0 ; i < rootNodes . length ; i ++ ) {
601+ if ( rootNodes [ i ] instanceof HTMLElement ) {
602+ title += " " + rootNodes [ i ] . outerHTML ;
603+ } else {
604+ title += " " + rootNodes [ i ] . textContent . trim ( ) ;
605+ }
604606 }
605607 }
606608 this . _$tabList . push ( title . trim ( ) ) ;
@@ -624,6 +626,7 @@ export class JigsawTab extends AbstractJigsawComponent implements AfterViewInit,
624626 private _tabsNav : ElementRef ;
625627
626628 private _updateOverflowButton ( ) {
629+ if ( ! this . _tabsNav || ! this . _tabsNavWrap ) return ;
627630 this . _$showOverflowButton = this . _tabsNavWrap . nativeElement . offsetWidth < this . _tabsNav . nativeElement . offsetWidth
628631 }
629632
You can’t perform that action at this time.
0 commit comments