File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ export function broadcastChatHandler(ctrl: AnalyseCtrl): BroadcastChatHandler {
31
31
if ( msg . includes ( separator ) && ctrl . study ?. relay ) {
32
32
const segs = msg . split ( separator ) ;
33
33
if ( segs . length == 3 ) {
34
- const [ _ , chapterId , ply ] = segs ;
34
+ const [ , chapterId , ply ] = segs ;
35
35
await ctrl . study . setChapter ( chapterId ) ;
36
36
ctrl . jumpToMain ( parseInt ( ply ) ) ;
37
37
}
@@ -42,7 +42,7 @@ export function broadcastChatHandler(ctrl: AnalyseCtrl): BroadcastChatHandler {
42
42
if ( msg . includes ( separator ) && ctrl . study ?. relay ) {
43
43
const segs = msg . split ( separator ) ;
44
44
if ( segs . length == 3 ) {
45
- const [ _ , chapterId , ply ] = segs ;
45
+ const [ , chapterId , ply ] = segs ;
46
46
return `${ chapterId } #${ ply } ` ;
47
47
}
48
48
}
Original file line number Diff line number Diff line change @@ -56,10 +56,8 @@ export function throttlePromise<T extends (...args: any) => Promise<void>>(
56
56
wrapped : T ,
57
57
) : ( ...args : Parameters < T > ) => Promise < void > {
58
58
const throttler = throttlePromiseWithResult < void , T > ( wrapped ) ;
59
- return async function ( this : any , ...args : Parameters < T > ) : Promise < void > {
60
- try {
61
- return await throttler . apply ( this , args ) ;
62
- } catch { }
59
+ return function ( this : any , ...args : Parameters < T > ) : Promise < void > {
60
+ return throttler . apply ( this , args ) . catch ( ( ) => { } ) ;
63
61
} ;
64
62
}
65
63
You can’t perform that action at this time.
0 commit comments