Skip to content

Commit 5f522d5

Browse files
authored
! Fix searching in channel view broken (#3062)
1 parent 3e80e96 commit 5f522d5

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/renderer/views/Channel/Channel.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -682,13 +682,14 @@ export default Vue.extend({
682682
}
683683

684684
const currentTabNode = document.querySelector('.tabs > .tab[aria-selected="true"]')
685+
// `newTabNode` can be `null` when `tab` === "search"
685686
const newTabNode = document.getElementById(`${tab}Tab`)
686687
document.querySelector('.tabs > .tab[tabindex="0"]').setAttribute('tabindex', '-1')
687-
newTabNode.setAttribute('tabindex', '0')
688+
newTabNode?.setAttribute('tabindex', '0')
688689
currentTabNode.setAttribute('aria-selected', 'false')
689-
newTabNode.setAttribute('aria-selected', 'true')
690+
newTabNode?.setAttribute('aria-selected', 'true')
690691
this.currentTab = tab
691-
newTabNode.focus({ focusVisible: true })
692+
newTabNode?.focus({ focusVisible: true })
692693
},
693694

694695
newSearch: function (query) {

0 commit comments

Comments
 (0)