File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
src/renderer/views/Channel Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -682,13 +682,14 @@ export default Vue.extend({
682
682
}
683
683
684
684
const currentTabNode = document . querySelector ( '.tabs > .tab[aria-selected="true"]' )
685
+ // `newTabNode` can be `null` when `tab` === "search"
685
686
const newTabNode = document . getElementById ( `${ tab } Tab` )
686
687
document . querySelector ( '.tabs > .tab[tabindex="0"]' ) . setAttribute ( 'tabindex' , '-1' )
687
- newTabNode . setAttribute ( 'tabindex' , '0' )
688
+ newTabNode ? .setAttribute ( 'tabindex' , '0' )
688
689
currentTabNode . setAttribute ( 'aria-selected' , 'false' )
689
- newTabNode . setAttribute ( 'aria-selected' , 'true' )
690
+ newTabNode ? .setAttribute ( 'aria-selected' , 'true' )
690
691
this . currentTab = tab
691
- newTabNode . focus ( { focusVisible : true } )
692
+ newTabNode ? .focus ( { focusVisible : true } )
692
693
} ,
693
694
694
695
newSearch : function ( query ) {
You can’t perform that action at this time.
0 commit comments