From 3f251aade92a57a9eae3cf23e34fb2dd80823fbd Mon Sep 17 00:00:00 2001 From: xiaokang Date: Thu, 4 Jul 2024 16:12:08 +0800 Subject: [PATCH] fix: return correct --- src/common/network/sql/executeSQL.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/network/sql/executeSQL.tsx b/src/common/network/sql/executeSQL.tsx index 98f789232..bb60ad58d 100644 --- a/src/common/network/sql/executeSQL.tsx +++ b/src/common/network/sql/executeSQL.tsx @@ -91,7 +91,7 @@ class Task { } return res?.data; }; - public getResult = async (): Promise => { + public getResult = async (): Promise => { return new Promise((resolve, reject) => { this.onUpdate({ finished: false, @@ -172,7 +172,7 @@ class TaskManager { sessionId: string, taskInfo: ISQLExecuteTask, onUpdate: (info: IExecutingInfo) => void, - ): Promise { + ): Promise { const task = new Task(requestId, sessionId, taskInfo, onUpdate); this.tasks.push(task); try { @@ -258,7 +258,7 @@ export default async function executeSQL( taskInfo, onUpdate, ); - let { results } = executeRes; + let results = executeRes; results = results?.map((result) => { if (!result.requestId) { result.requestId = requestId;