File tree 2 files changed +5
-7
lines changed
2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -15,12 +15,10 @@ class MutationObserverTitle {
15
15
console . log ( window . document . title ) ;
16
16
const regex = / ^ \( ( \d + ) \) / ;
17
17
const match = window . document . title . match ( regex ) ;
18
- if ( match ) {
19
- const number = match [ 1 ] ;
20
- console . log ( number ) ;
21
- const event = new CustomEvent ( 'unread-count' , { detail : { number : number } } ) ;
22
- window . dispatchEvent ( event ) ;
23
- }
18
+ const number = match ? match [ 1 ] : 0 ;
19
+ console . log ( number ) ;
20
+ const event = new CustomEvent ( 'unread-count' , { detail : { number : number } } ) ;
21
+ window . dispatchEvent ( event ) ;
24
22
}
25
23
) ;
26
24
observer . observe ( window . document . querySelector ( 'title' ) , { childList : true } ) ;
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " teams-for-linux" ,
3
- "version" : " 1.4.19 " ,
3
+ "version" : " 1.4.20 " ,
4
4
"main" : " app/index.js" ,
5
5
"description" : " Unofficial client for Microsoft Teams for Linux" ,
6
6
"homepage" : " https://github.com/IsmaelMartinez/teams-for-linux" ,
You can’t perform that action at this time.
0 commit comments