mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-12-19 05:05:44 +08:00
Fix useStream variable scope in HTTP server adapter
Moved the declaration of useStream inside the action check to prevent referencing it when action is undefined.
This commit is contained in:
parent
2161ec5fa7
commit
a36ae315b0
@ -121,8 +121,8 @@ export class OB11HttpServerAdapter extends IOB11NetworkAdapter<HttpServerConfig>
|
||||
const real_echo = payload_echo ?? Math.random().toString(36).substring(2, 15);
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const action = this.actions.get(actionName as any);
|
||||
const useStream = action.useStream;
|
||||
if (action) {
|
||||
const useStream = action.useStream;
|
||||
try {
|
||||
const result = await action.handle(payload, this.name, this.config, {
|
||||
send: request_sse ? async (data: object) => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user