fix: stopTask func need use async/await syntax
This commit is contained in:
1 parent
3b70cd64d7
commit
533c99e384
1 file changed
+3
-2
@@ -1683,9 +1683,10 @@
|
|||||||
history.messages[responseMessage.id] = responseMessage;
|
history.messages[responseMessage.id] = responseMessage;
|
||||||
};
|
};
|
||||||
|
|
||||||
const stopResponse = () => {
|
const stopResponse = async () => {
|
||||||
if (taskId) {
|
if (taskId) {
|
||||||
const res = stopTask(localStorage.token, taskId).catch((error) => {
|
const res = await stopTask(localStorage.token, taskId).catch((error) => {
|
||||||
|
toast.error(error);
|
||||||
return null;
|
return null;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user