Skip to content

Commit 1a77d80

Browse files
committed
pnpm lint fixes
1 parent eda345a commit 1a77d80

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

ui/analyse/src/study/relay/chatHandler.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export function broadcastChatHandler(ctrl: AnalyseCtrl): BroadcastChatHandler {
3131
if (msg.includes(separator) && ctrl.study?.relay) {
3232
const segs = msg.split(separator);
3333
if (segs.length == 3) {
34-
const [_, chapterId, ply] = segs;
34+
const [, chapterId, ply] = segs;
3535
await ctrl.study.setChapter(chapterId);
3636
ctrl.jumpToMain(parseInt(ply));
3737
}
@@ -42,7 +42,7 @@ export function broadcastChatHandler(ctrl: AnalyseCtrl): BroadcastChatHandler {
4242
if (msg.includes(separator) && ctrl.study?.relay) {
4343
const segs = msg.split(separator);
4444
if (segs.length == 3) {
45-
const [_, chapterId, ply] = segs;
45+
const [, chapterId, ply] = segs;
4646
return `${chapterId}#${ply}`;
4747
}
4848
}

ui/common/src/throttle.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,8 @@ export function throttlePromise<T extends (...args: any) => Promise<void>>(
5656
wrapped: T,
5757
): (...args: Parameters<T>) => Promise<void> {
5858
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(() => {});
6361
};
6462
}
6563

0 commit comments

Comments
 (0)