Remove no-op voids and add explicit SW return

Remove a pointless `void options.callbackTimeout;` no-op in napcat-rpc client. In the service worker template, add `/* eslint-disable no-undef */` and an explicit `return undefined;` in the cache cleanup callback to make the return value explicit and satisfy linters. In the OneBot debug UI, call `sendRequest(value)` without the leading `void` so the returned promise is not intentionally ignored.
This commit is contained in:
手瓜一十雪 committed 2026-03-05 18:57:30 +08:00
1 parent b15d02535e
commit 4ed4dfd450
3 files changed
+3 -2

No files matched your search

@@ -169,7 +169,7 @@ const OneBotApiDebug = forwardRef<OneBotApiDebugRef, OneBotApiDebugProps>((props
setActiveTab('request');
setRequestBody(value);
// 直接用 override 发送,避免 setState 异步导致拿到旧值
void sendRequest(value);
sendRequest(value);
},
focusRequestEditor: () => {
setActiveTab('request');